summaryrefslogtreecommitdiffstats
path: root/fs/mount.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-05-08 17:43:53 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2015-05-11 14:13:14 +0200
commit294d71ff2f020aa2ef7057a7bd10cf2ec71b5ee3 (patch)
treeb5fe63b7b42ea32ba0d05eca331548e623f66a97 /fs/mount.h
parentnamei: make may_follow_link() safe in RCU mode (diff)
downloadlinux-294d71ff2f020aa2ef7057a7bd10cf2ec71b5ee3.tar.xz
linux-294d71ff2f020aa2ef7057a7bd10cf2ec71b5ee3.zip
new helper: __legitimize_mnt()
same as legitimize_mnt(), except that it does *not* drop and regain rcu_read_lock; return values are 0 => grabbed a reference, we are fine 1 => failed, just go away -1 => failed, go away and mntput(bastard) when outside of rcu_read_lock Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/mount.h')
-rw-r--r--fs/mount.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/mount.h b/fs/mount.h
index 6a61c2b3e385..b5b8082bfa42 100644
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -88,6 +88,7 @@ static inline int is_mounted(struct vfsmount *mnt)
extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *);
extern struct mount *__lookup_mnt_last(struct vfsmount *, struct dentry *);
+extern int __legitimize_mnt(struct vfsmount *, unsigned);
extern bool legitimize_mnt(struct vfsmount *, unsigned);
extern void __detach_mounts(struct dentry *dentry);