Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fuse: no need for special dentry_operations for root dentry

->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>

Al Viro 4bd9f3fd ec169ef8

+1 -11
-7
fs/fuse/dir.c
··· 338 338 .d_automount = fuse_dentry_automount, 339 339 }; 340 340 341 - const struct dentry_operations fuse_root_dentry_operations = { 342 - #if BITS_PER_LONG < 64 343 - .d_init = fuse_dentry_init, 344 - .d_release = fuse_dentry_release, 345 - #endif 346 - }; 347 - 348 341 int fuse_valid_type(int m) 349 342 { 350 343 return S_ISREG(m) || S_ISDIR(m) || S_ISLNK(m) || S_ISCHR(m) ||
-1
fs/fuse/fuse_i.h
··· 1109 1109 extern const struct file_operations fuse_dev_operations; 1110 1110 1111 1111 extern const struct dentry_operations fuse_dentry_operations; 1112 - extern const struct dentry_operations fuse_root_dentry_operations; 1113 1112 1114 1113 /** 1115 1114 * Get a filled in inode
+1 -3
fs/fuse/inode.c
··· 1850 1850 1851 1851 err = -ENOMEM; 1852 1852 root = fuse_get_root_inode(sb, ctx->rootmode); 1853 - sb->s_d_op = &fuse_root_dentry_operations; 1853 + sb->s_d_op = &fuse_dentry_operations; 1854 1854 root_dentry = d_make_root(root); 1855 1855 if (!root_dentry) 1856 1856 goto err_dev_free; 1857 - /* Root dentry doesn't have .d_revalidate */ 1858 - sb->s_d_op = &fuse_dentry_operations; 1859 1857 1860 1858 mutex_lock(&fuse_mutex); 1861 1859 err = -EINVAL;