1
0
Fork 0

switch follow_mount()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
wifi-calibration
Al Viro 2009-04-18 13:59:41 -04:00
parent 9393bd07cf
commit 79ed022619
1 changed files with 8 additions and 8 deletions

View File

@ -715,16 +715,16 @@ static int __follow_mount(struct path *path)
return res; return res;
} }
static void follow_mount(struct vfsmount **mnt, struct dentry **dentry) static void follow_mount(struct path *path)
{ {
while (d_mountpoint(*dentry)) { while (d_mountpoint(path->dentry)) {
struct vfsmount *mounted = lookup_mnt(*mnt, *dentry); struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry);
if (!mounted) if (!mounted)
break; break;
dput(*dentry); dput(path->dentry);
mntput(*mnt); mntput(path->mnt);
*mnt = mounted; path->mnt = mounted;
*dentry = dget(mounted->mnt_root); path->dentry = dget(mounted->mnt_root);
} }
} }
@ -779,7 +779,7 @@ static __always_inline void follow_dotdot(struct nameidata *nd)
mntput(nd->path.mnt); mntput(nd->path.mnt);
nd->path.mnt = parent; nd->path.mnt = parent;
} }
follow_mount(&nd->path.mnt, &nd->path.dentry); follow_mount(&nd->path);
} }
/* /*