]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fuse: no need for special dentry_operations for root dentry
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 23 Feb 2025 22:54:57 +0000 (17:54 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 11 Jun 2025 02:15:18 +0000 (22:15 -0400)
->d_revalidate() is never called for root anyway...

Reviewed-by: Christian Brauner <brauner@kernel.org>
Acked-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/fuse/dir.c
fs/fuse/fuse_i.h
fs/fuse/inode.c

index 45b4c3cc1396afdf6e48039ae8cc465fa929280f..2d817d7cab2649c5384affd5a9e99462e6af320e 100644 (file)
@@ -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) ||
index b54f4f57789f7f369a8a9505c1c9dcfc53c71cd1..fb885376db6acad4f1da0e07cf6ef394c78b2a2c 100644 (file)
@@ -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
index bfe8d8af46f3c30cef9c5f189bf8865aa435b705..eb61775085982aca5588b02e8d4bdc0b0f17fd4c 100644 (file)
@@ -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;