提交 e61da20a 编写于 作者: I Ian Kent 提交者: Al Viro

autofs4: Clean up inode operations

Since the use of ->follow_link() has been eliminated there is no
need to separate the indirect and direct inode operations.
Signed-off-by: NIan Kent <raven@themaw.net>
Signed-off-by: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 8c13a676
...@@ -204,9 +204,6 @@ void autofs_dev_ioctl_exit(void); ...@@ -204,9 +204,6 @@ void autofs_dev_ioctl_exit(void);
extern const struct inode_operations autofs4_symlink_inode_operations; extern const struct inode_operations autofs4_symlink_inode_operations;
extern const struct inode_operations autofs4_dir_inode_operations; extern const struct inode_operations autofs4_dir_inode_operations;
extern const struct inode_operations autofs4_root_inode_operations;
extern const struct inode_operations autofs4_indirect_root_inode_operations;
extern const struct inode_operations autofs4_direct_root_inode_operations;
extern const struct file_operations autofs4_dir_operations; extern const struct file_operations autofs4_dir_operations;
extern const struct file_operations autofs4_root_operations; extern const struct file_operations autofs4_root_operations;
......
...@@ -326,9 +326,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) ...@@ -326,9 +326,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
__managed_dentry_set_managed(root); __managed_dentry_set_managed(root);
root_inode->i_fop = &autofs4_root_operations; root_inode->i_fop = &autofs4_root_operations;
root_inode->i_op = autofs_type_trigger(sbi->type) ? root_inode->i_op = &autofs4_dir_inode_operations;
&autofs4_direct_root_inode_operations :
&autofs4_indirect_root_inode_operations;
/* Couldn't this be tested earlier? */ /* Couldn't this be tested earlier? */
if (sbi->max_proto < AUTOFS_MIN_PROTO_VERSION || if (sbi->max_proto < AUTOFS_MIN_PROTO_VERSION ||
......
...@@ -56,21 +56,6 @@ const struct file_operations autofs4_dir_operations = { ...@@ -56,21 +56,6 @@ const struct file_operations autofs4_dir_operations = {
.llseek = dcache_dir_lseek, .llseek = dcache_dir_lseek,
}; };
const struct inode_operations autofs4_indirect_root_inode_operations = {
.lookup = autofs4_lookup,
.unlink = autofs4_dir_unlink,
.symlink = autofs4_dir_symlink,
.mkdir = autofs4_dir_mkdir,
.rmdir = autofs4_dir_rmdir,
};
const struct inode_operations autofs4_direct_root_inode_operations = {
.lookup = autofs4_lookup,
.unlink = autofs4_dir_unlink,
.mkdir = autofs4_dir_mkdir,
.rmdir = autofs4_dir_rmdir,
};
const struct inode_operations autofs4_dir_inode_operations = { const struct inode_operations autofs4_dir_inode_operations = {
.lookup = autofs4_lookup, .lookup = autofs4_lookup,
.unlink = autofs4_dir_unlink, .unlink = autofs4_dir_unlink,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册