split __lookup_mnt() in two functions

Instead of passing the direction as argument (and checking it on every
step through the hash chain), just have separate __lookup_mnt() and
__lookup_mnt_last().  And use the standard iterators...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2013-10-01 16:11:26 -04:00
parent 7eb5e88269
commit 474279dc0f
4 changed files with 30 additions and 25 deletions

View File

@@ -77,7 +77,8 @@ static inline int is_mounted(struct vfsmount *mnt)
return !IS_ERR_OR_NULL(real_mount(mnt));
}
extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *);
extern struct mount *__lookup_mnt_last(struct vfsmount *, struct dentry *);
static inline void get_mnt_ns(struct mnt_namespace *ns)
{