autofs4: Clean up dentry operations
There are now two distinct dentry operations uses. One for dentrys that trigger mounts and one for dentrys that do not. Rationalize the use of these dentry operations and rename them to reflect their function. Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@ -251,12 +251,6 @@ static struct autofs_info *autofs4_mkroot(struct autofs_sb_info *sbi)
|
||||
return ino;
|
||||
}
|
||||
|
||||
static const struct dentry_operations autofs4_sb_dentry_operations = {
|
||||
.d_automount = autofs4_d_automount,
|
||||
.d_manage = autofs4_d_manage,
|
||||
.d_release = autofs4_dentry_release,
|
||||
};
|
||||
|
||||
int autofs4_fill_super(struct super_block *s, void *data, int silent)
|
||||
{
|
||||
struct inode * root_inode;
|
||||
@ -311,7 +305,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
|
||||
goto fail_iput;
|
||||
pipe = NULL;
|
||||
|
||||
d_set_d_op(root, &autofs4_sb_dentry_operations);
|
||||
d_set_d_op(root, &autofs4_dentry_operations);
|
||||
root->d_fsdata = ino;
|
||||
|
||||
/* Can this call block? */
|
||||
@ -322,8 +316,10 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
|
||||
goto fail_dput;
|
||||
}
|
||||
|
||||
if (autofs_type_trigger(sbi->type))
|
||||
if (autofs_type_trigger(sbi->type)) {
|
||||
d_set_d_op(root, &autofs4_mount_dentry_operations);
|
||||
__managed_dentry_set_managed(root);
|
||||
}
|
||||
|
||||
root_inode->i_fop = &autofs4_root_operations;
|
||||
root_inode->i_op = &autofs4_dir_inode_operations;
|
||||
|
Reference in New Issue
Block a user