diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-01 16:11:26 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-24 23:35:00 -0400 |
commit | 474279dc0f7745124fc76b474c8dc1294f8e87ce (patch) | |
tree | 2ad5e963e698e9524e0eabe466534f03ce324226 /fs/namei.c | |
parent | 7eb5e8826911f2792179f99e77e75fbb7ef53a4a (diff) |
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>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index 645268f23eb6..1f844fbfce72 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1111,7 +1111,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path, | |||
1111 | if (!d_mountpoint(path->dentry)) | 1111 | if (!d_mountpoint(path->dentry)) |
1112 | break; | 1112 | break; |
1113 | 1113 | ||
1114 | mounted = __lookup_mnt(path->mnt, path->dentry, 1); | 1114 | mounted = __lookup_mnt(path->mnt, path->dentry); |
1115 | if (!mounted) | 1115 | if (!mounted) |
1116 | break; | 1116 | break; |
1117 | path->mnt = &mounted->mnt; | 1117 | path->mnt = &mounted->mnt; |
@@ -1132,7 +1132,7 @@ static void follow_mount_rcu(struct nameidata *nd) | |||
1132 | { | 1132 | { |
1133 | while (d_mountpoint(nd->path.dentry)) { | 1133 | while (d_mountpoint(nd->path.dentry)) { |
1134 | struct mount *mounted; | 1134 | struct mount *mounted; |
1135 | mounted = __lookup_mnt(nd->path.mnt, nd->path.dentry, 1); | 1135 | mounted = __lookup_mnt(nd->path.mnt, nd->path.dentry); |
1136 | if (!mounted) | 1136 | if (!mounted) |
1137 | break; | 1137 | break; |
1138 | nd->path.mnt = &mounted->mnt; | 1138 | nd->path.mnt = &mounted->mnt; |