OSDN Git Service

afs dynroot: switch to simple_dir_operations
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 15 Sep 2019 16:19:48 +0000 (12:19 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 15 Sep 2019 16:19:48 +0000 (12:19 -0400)
no point reinventing it (with wrong ->read(), BTW).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/afs/dynroot.c
fs/afs/inode.c
fs/afs/internal.h

index bcd1baf..4150280 100644 (file)
 #include <linux/dns_resolver.h>
 #include "internal.h"
 
-const struct file_operations afs_dynroot_file_operations = {
-       .open           = dcache_dir_open,
-       .release        = dcache_dir_close,
-       .iterate_shared = dcache_readdir,
-       .llseek         = dcache_dir_lseek,
-};
-
 /*
  * Probe to see if a cell may exist.  This prevents positive dentries from
  * being created unnecessarily.
index 7b1c18c..46d2d7c 100644 (file)
@@ -443,7 +443,7 @@ struct inode *afs_iget_pseudo_dir(struct super_block *sb, bool root)
        inode->i_mode           = S_IFDIR | S_IRUGO | S_IXUGO;
        if (root) {
                inode->i_op     = &afs_dynroot_inode_operations;
-               inode->i_fop    = &afs_dynroot_file_operations;
+               inode->i_fop    = &simple_dir_operations;
        } else {
                inode->i_op     = &afs_autocell_inode_operations;
        }
index f66a3be..9b2a2a2 100644 (file)
@@ -910,7 +910,6 @@ extern int afs_silly_iput(struct dentry *, struct inode *);
 /*
  * dynroot.c
  */
-extern const struct file_operations afs_dynroot_file_operations;
 extern const struct inode_operations afs_dynroot_inode_operations;
 extern const struct dentry_operations afs_dynroot_dentry_operations;