Commit 79ed0226198c628133530b179a90dbf42b1c2eba
1 parent
9393bd07cf
Exists in
master
and in
20 other branches
switch follow_mount()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 1 changed file with 8 additions and 8 deletions Side-by-side Diff
fs/namei.c
... | ... | @@ -715,16 +715,16 @@ |
715 | 715 | return res; |
716 | 716 | } |
717 | 717 | |
718 | -static void follow_mount(struct vfsmount **mnt, struct dentry **dentry) | |
718 | +static void follow_mount(struct path *path) | |
719 | 719 | { |
720 | - while (d_mountpoint(*dentry)) { | |
721 | - struct vfsmount *mounted = lookup_mnt(*mnt, *dentry); | |
720 | + while (d_mountpoint(path->dentry)) { | |
721 | + struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry); | |
722 | 722 | if (!mounted) |
723 | 723 | break; |
724 | - dput(*dentry); | |
725 | - mntput(*mnt); | |
726 | - *mnt = mounted; | |
727 | - *dentry = dget(mounted->mnt_root); | |
724 | + dput(path->dentry); | |
725 | + mntput(path->mnt); | |
726 | + path->mnt = mounted; | |
727 | + path->dentry = dget(mounted->mnt_root); | |
728 | 728 | } |
729 | 729 | } |
730 | 730 | |
... | ... | @@ -779,7 +779,7 @@ |
779 | 779 | mntput(nd->path.mnt); |
780 | 780 | nd->path.mnt = parent; |
781 | 781 | } |
782 | - follow_mount(&nd->path.mnt, &nd->path.dentry); | |
782 | + follow_mount(&nd->path); | |
783 | 783 | } |
784 | 784 | |
785 | 785 | /* |