diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-06-01 17:51:08 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-06-01 17:51:08 +0200 |
| commit | 1bab7eea6ecd7325ed62daecc8cd3a8f5b20f26f (patch) | |
| tree | f9a23c140fe90e3959231d1f5e4b6e4e218895a3 /fs/fuse/dir.c | |
| parent | 799289456aa4a482feecff17333b1113a963511b (diff) | |
| parent | 18ad16ce4a6b2714583fd1e1044c6ea8e53b3519 (diff) | |
Merge v6.18.34linux-rolling-lts
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/fuse/dir.c')
| -rw-r--r-- | fs/fuse/dir.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index ecaec0fea3a1..1bc6982b5d6a 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -283,21 +283,33 @@ invalid: goto out; } -#if BITS_PER_LONG < 64 static int fuse_dentry_init(struct dentry *dentry) { + int ret = 0; + + /* + * Initialising d_time (epoch) to '0' ensures the dentry is invalid + * if compared to fc->epoch, which is initialized to '1'. + */ + dentry->d_time = 0; + +#if BITS_PER_LONG < 64 dentry->d_fsdata = kzalloc(sizeof(union fuse_dentry), GFP_KERNEL_ACCOUNT | __GFP_RECLAIMABLE); - return dentry->d_fsdata ? 0 : -ENOMEM; + ret = dentry->d_fsdata ? 0 : -ENOMEM; +#endif + + return ret; } static void fuse_dentry_release(struct dentry *dentry) { +#if BITS_PER_LONG < 64 union fuse_dentry *fd = dentry->d_fsdata; kfree_rcu(fd, rcu); -} #endif +} static int fuse_dentry_delete(const struct dentry *dentry) { @@ -331,10 +343,8 @@ static struct vfsmount *fuse_dentry_automount(struct path *path) const struct dentry_operations fuse_dentry_operations = { .d_revalidate = fuse_dentry_revalidate, .d_delete = fuse_dentry_delete, -#if BITS_PER_LONG < 64 .d_init = fuse_dentry_init, .d_release = fuse_dentry_release, -#endif .d_automount = fuse_dentry_automount, }; |
