diff options
author | Ian Kent <raven@themaw.net> | 2011-01-14 18:45:58 +0000 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-15 20:07:37 -0500 |
commit | 10584211e48036182212b598cc53331776406d60 (patch) | |
tree | b66067b47a1104c3ae3ccd4248c9b41d5b869c5e /fs/autofs4/inode.c | |
parent | db3729153e82ba3ada89681f26c4f1b6d6807a80 (diff) |
autofs4: Add d_automount() dentry operation
Add a function to use the newly defined ->d_automount() dentry operation
for triggering mounts instead of doing the user space callback in ->lookup()
and ->d_revalidate().
Note, to be useful the subsequent patch to add the ->d_manage() dentry
operation is also needed so the discussion of functionality is deferred to
that patch.
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c index a7bdb9dcac8..d0aa38cac30 100644 --- a/fs/autofs4/inode.c +++ b/fs/autofs4/inode.c @@ -252,6 +252,7 @@ static struct autofs_info *autofs4_mkroot(struct autofs_sb_info *sbi) } static const struct dentry_operations autofs4_sb_dentry_operations = { + .d_automount = autofs4_d_automount, .d_release = autofs4_dentry_release, }; @@ -320,6 +321,9 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) goto fail_dput; } + if (autofs_type_trigger(sbi->type)) + __managed_dentry_set_automount(root); + root_inode->i_fop = &autofs4_root_operations; root_inode->i_op = autofs_type_trigger(sbi->type) ? &autofs4_direct_root_inode_operations : |