diff options
| author | Al Viro <[email protected]> | 2025-02-23 22:54:57 +0000 |
|---|---|---|
| committer | Al Viro <[email protected]> | 2025-06-11 02:15:18 +0000 |
| commit | 4bd9f3fd87e252303e8fef6105b704f05d3f2678 (patch) | |
| tree | 2b53254f193bdbe4a60973fd72be60501e41cdb1 | |
| parent | switch procfs from d_set_d_op() to d_splice_alias_ops() (diff) | |
| download | kernel-4bd9f3fd87e252303e8fef6105b704f05d3f2678.tar.gz kernel-4bd9f3fd87e252303e8fef6105b704f05d3f2678.zip | |
fuse: no need for special dentry_operations for root dentry
->d_revalidate() is never called for root anyway...
Reviewed-by: Christian Brauner <[email protected]>
Acked-by: Miklos Szeredi <[email protected]>
Signed-off-by: Al Viro <[email protected]>
| -rw-r--r-- | fs/fuse/dir.c | 7 | ||||
| -rw-r--r-- | fs/fuse/fuse_i.h | 1 | ||||
| -rw-r--r-- | fs/fuse/inode.c | 4 |
3 files changed, 1 insertions, 11 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 45b4c3cc1396..2d817d7cab26 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -338,13 +338,6 @@ const struct dentry_operations fuse_dentry_operations = { .d_automount = fuse_dentry_automount, }; -const struct dentry_operations fuse_root_dentry_operations = { -#if BITS_PER_LONG < 64 - .d_init = fuse_dentry_init, - .d_release = fuse_dentry_release, -#endif -}; - int fuse_valid_type(int m) { return S_ISREG(m) || S_ISDIR(m) || S_ISLNK(m) || S_ISCHR(m) || diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index b54f4f57789f..fb885376db6a 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -1109,7 +1109,6 @@ static inline void fuse_sync_bucket_dec(struct fuse_sync_bucket *bucket) extern const struct file_operations fuse_dev_operations; extern const struct dentry_operations fuse_dentry_operations; -extern const struct dentry_operations fuse_root_dentry_operations; /** * Get a filled in inode diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index bfe8d8af46f3..eb6177508598 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1850,12 +1850,10 @@ int fuse_fill_super_common(struct super_block *sb, struct fuse_fs_context *ctx) err = -ENOMEM; root = fuse_get_root_inode(sb, ctx->rootmode); - sb->s_d_op = &fuse_root_dentry_operations; + sb->s_d_op = &fuse_dentry_operations; root_dentry = d_make_root(root); if (!root_dentry) goto err_dev_free; - /* Root dentry doesn't have .d_revalidate */ - sb->s_d_op = &fuse_dentry_operations; mutex_lock(&fuse_mutex); err = -EINVAL; |
