aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/inode.c
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2011-01-14 13:46:19 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-01-15 20:07:41 -0500
commit71e469db242c2eeb00faf9caf7d9e00150c00a6e (patch)
tree8fdb7f6900edca6f2973f9ae64331895112f017e /fs/autofs4/inode.c
parente61da20a50d21725ff27571a6dff9468e4fb7146 (diff)
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>
Diffstat (limited to 'fs/autofs4/inode.c')
-rw-r--r--fs/autofs4/inode.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index dac3dc79ccb4..427c35746340 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -251,12 +251,6 @@ static struct autofs_info *autofs4_mkroot(struct autofs_sb_info *sbi)
251 return ino; 251 return ino;
252} 252}
253 253
254static const struct dentry_operations autofs4_sb_dentry_operations = {
255 .d_automount = autofs4_d_automount,
256 .d_manage = autofs4_d_manage,
257 .d_release = autofs4_dentry_release,
258};
259
260int autofs4_fill_super(struct super_block *s, void *data, int silent) 254int autofs4_fill_super(struct super_block *s, void *data, int silent)
261{ 255{
262 struct inode * root_inode; 256 struct inode * root_inode;
@@ -311,7 +305,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
311 goto fail_iput; 305 goto fail_iput;
312 pipe = NULL; 306 pipe = NULL;
313 307
314 d_set_d_op(root, &autofs4_sb_dentry_operations); 308 d_set_d_op(root, &autofs4_dentry_operations);
315 root->d_fsdata = ino; 309 root->d_fsdata = ino;
316 310
317 /* Can this call block? */ 311 /* Can this call block? */
@@ -322,8 +316,10 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
322 goto fail_dput; 316 goto fail_dput;
323 } 317 }
324 318
325 if (autofs_type_trigger(sbi->type)) 319 if (autofs_type_trigger(sbi->type)) {
320 d_set_d_op(root, &autofs4_mount_dentry_operations);
326 __managed_dentry_set_managed(root); 321 __managed_dentry_set_managed(root);
322 }
327 323
328 root_inode->i_fop = &autofs4_root_operations; 324 root_inode->i_fop = &autofs4_root_operations;
329 root_inode->i_op = &autofs4_dir_inode_operations; 325 root_inode->i_op = &autofs4_dir_inode_operations;