aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 4d49a3eee6d4..c006bc61d1ea 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -715,16 +715,16 @@ static int __follow_mount(struct path *path)
715 return res; 715 return res;
716} 716}
717 717
718static void follow_mount(struct vfsmount **mnt, struct dentry **dentry) 718static void follow_mount(struct path *path)
719{ 719{
720 while (d_mountpoint(*dentry)) { 720 while (d_mountpoint(path->dentry)) {
721 struct vfsmount *mounted = lookup_mnt(*mnt, *dentry); 721 struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry);
722 if (!mounted) 722 if (!mounted)
723 break; 723 break;
724 dput(*dentry); 724 dput(path->dentry);
725 mntput(*mnt); 725 mntput(path->mnt);
726 *mnt = mounted; 726 path->mnt = mounted;
727 *dentry = dget(mounted->mnt_root); 727 path->dentry = dget(mounted->mnt_root);
728 } 728 }
729} 729}
730 730
@@ -779,7 +779,7 @@ static __always_inline void follow_dotdot(struct nameidata *nd)
779 mntput(nd->path.mnt); 779 mntput(nd->path.mnt);
780 nd->path.mnt = parent; 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/*