Lines Matching refs:new_nd
1621 static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
1635 set_fs_root(fs, new_nd->mnt, new_nd->dentry);
1638 set_fs_pwd(fs, new_nd->mnt, new_nd->dentry);
1675 struct nameidata new_nd, old_nd, parent_nd, root_parent, user_nd;
1684 &new_nd);
1688 if (!check_mnt(new_nd.mnt))
1695 error = security_sb_pivotroot(&old_nd, &new_nd);
1709 IS_MNT_SHARED(new_nd.mnt->mnt_parent) ||
1715 if (IS_DEADDIR(new_nd.dentry->d_inode))
1717 if (d_unhashed(new_nd.dentry) && !IS_ROOT(new_nd.dentry))
1722 if (new_nd.mnt == user_nd.mnt || old_nd.mnt == user_nd.mnt)
1729 if (new_nd.mnt->mnt_root != new_nd.dentry)
1731 if (new_nd.mnt->mnt_parent == new_nd.mnt)
1735 if (tmp != new_nd.mnt) {
1739 if (tmp->mnt_parent == new_nd.mnt)
1743 if (!is_subdir(tmp->mnt_mountpoint, new_nd.dentry))
1745 } else if (!is_subdir(old_nd.dentry, new_nd.dentry))
1747 detach_mnt(new_nd.mnt, &parent_nd);
1750 attach_mnt(new_nd.mnt, &root_parent); /* mount new_root on / */
1753 chroot_fs_refs(&user_nd, &new_nd);
1754 security_sb_post_pivotroot(&user_nd, &new_nd);
1764 path_release(&new_nd);