@@ -1667,39 +1667,39 @@ static noinline int do_new_mount(struct nameidata *nd, char *type, int flags,
16671667 if (IS_ERR (mnt ))
16681668 return PTR_ERR (mnt );
16691669
1670- return do_add_mount (mnt , nd , mnt_flags , NULL );
1670+ return do_add_mount (mnt , & nd -> path , mnt_flags , NULL );
16711671}
16721672
16731673/*
16741674 * add a mount into a namespace's mount tree
16751675 * - provide the option of adding the new mount to an expiration list
16761676 */
1677- int do_add_mount (struct vfsmount * newmnt , struct nameidata * nd ,
1677+ int do_add_mount (struct vfsmount * newmnt , struct path * path ,
16781678 int mnt_flags , struct list_head * fslist )
16791679{
16801680 int err ;
16811681
16821682 down_write (& namespace_sem );
16831683 /* Something was mounted here while we slept */
1684- while (d_mountpoint (nd -> path . dentry ) &&
1685- follow_down (& nd -> path . mnt , & nd -> path . dentry ))
1684+ while (d_mountpoint (path -> dentry ) &&
1685+ follow_down (& path -> mnt , & path -> dentry ))
16861686 ;
16871687 err = - EINVAL ;
1688- if (!check_mnt (nd -> path . mnt ))
1688+ if (!check_mnt (path -> mnt ))
16891689 goto unlock ;
16901690
16911691 /* Refuse the same filesystem on the same mount point */
16921692 err = - EBUSY ;
1693- if (nd -> path . mnt -> mnt_sb == newmnt -> mnt_sb &&
1694- nd -> path . mnt -> mnt_root == nd -> path . dentry )
1693+ if (path -> mnt -> mnt_sb == newmnt -> mnt_sb &&
1694+ path -> mnt -> mnt_root == path -> dentry )
16951695 goto unlock ;
16961696
16971697 err = - EINVAL ;
16981698 if (S_ISLNK (newmnt -> mnt_root -> d_inode -> i_mode ))
16991699 goto unlock ;
17001700
17011701 newmnt -> mnt_flags = mnt_flags ;
1702- if ((err = graft_tree (newmnt , & nd -> path )))
1702+ if ((err = graft_tree (newmnt , path )))
17031703 goto unlock ;
17041704
17051705 if (fslist ) /* add to the specified expiration list */
0 commit comments