summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAl Viro2011-11-17 03:43:59 +0100
committerAl Viro2011-11-17 04:00:34 +0100
commitea441d1104cf1efb471fa81bc91e9fd1e6ae29fd (patch)
tree32b7c4f7c78af47936a604e3f4e13e8e61f834a0 /include/linux
parentswitch create_mnt_ns() to saner calling conventions, fix double mntput() in nfs (diff)
downloadkernel-qcow2-linux-ea441d1104cf1efb471fa81bc91e9fd1e6ae29fd.tar.gz
kernel-qcow2-linux-ea441d1104cf1efb471fa81bc91e9fd1e6ae29fd.tar.xz
kernel-qcow2-linux-ea441d1104cf1efb471fa81bc91e9fd1e6ae29fd.zip
new helper: mount_subtree()
takes vfsmount and relative path, does lookup within that vfsmount (possibly triggering automounts) and returns the result as root of subtree suitable for return by ->mount() (i.e. a reference to dentry and an active reference to its superblock grabbed, superblock locked exclusive). btrfs and nfs switched to it instead of open-coding the sucker. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0c4df261af7e..e3130220ce3e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1886,6 +1886,7 @@ extern struct dentry *mount_single(struct file_system_type *fs_type,
extern struct dentry *mount_nodev(struct file_system_type *fs_type,
int flags, void *data,
int (*fill_super)(struct super_block *, void *, int));
+extern struct dentry *mount_subtree(struct vfsmount *mnt, const char *path);
void generic_shutdown_super(struct super_block *sb);
void kill_block_super(struct super_block *sb);
void kill_anon_super(struct super_block *sb);