Lines Matching refs:old_nd

97 static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd)  in detach_mnt()  argument
99 old_nd->dentry = mnt->mnt_mountpoint; in detach_mnt()
100 old_nd->mnt = mnt->mnt_parent; in detach_mnt()
105 old_nd->dentry->d_mounted--; in detach_mnt()
279 struct nameidata old_nd; in umount_tree() local
280 detach_mnt(mnt, &old_nd); in umount_tree()
282 path_release(&old_nd); in umount_tree()
489 struct nameidata old_nd; in do_loopback() local
496 err = path_lookup(old_name, LOOKUP_POSITIVE|LOOKUP_FOLLOW, &old_nd); in do_loopback()
502 if (check_mnt(nd->mnt) && (!recurse || check_mnt(old_nd.mnt))) { in do_loopback()
505 mnt = copy_tree(old_nd.mnt, old_nd.dentry); in do_loopback()
507 mnt = clone_mnt(old_nd.mnt, old_nd.dentry); in do_loopback()
521 path_release(&old_nd); in do_loopback()
555 struct nameidata old_nd, parent_nd; in do_move_mount() local
562 err = path_lookup(old_name, LOOKUP_POSITIVE|LOOKUP_FOLLOW, &old_nd); in do_move_mount()
570 if (!check_mnt(nd->mnt) || !check_mnt(old_nd.mnt)) in do_move_mount()
583 if (old_nd.dentry != old_nd.mnt->mnt_root) in do_move_mount()
586 if (old_nd.mnt == old_nd.mnt->mnt_parent) in do_move_mount()
590 S_ISDIR(old_nd.dentry->d_inode->i_mode)) in do_move_mount()
595 if (p == old_nd.mnt) in do_move_mount()
599 detach_mnt(old_nd.mnt, &parent_nd); in do_move_mount()
600 attach_mnt(old_nd.mnt, nd); in do_move_mount()
609 path_release(&old_nd); in do_move_mount()
870 static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd) in chroot_fs_refs() argument
882 if (fs->root==old_nd->dentry&&fs->rootmnt==old_nd->mnt) in chroot_fs_refs()
884 if (fs->pwd==old_nd->dentry&&fs->pwdmnt==old_nd->mnt) in chroot_fs_refs()
909 struct nameidata new_nd, old_nd, parent_nd, root_parent, user_nd; in sys_pivot_root() local
924 error = __user_walk(put_old, LOOKUP_POSITIVE|LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &old_nd); in sys_pivot_root()
933 down(&old_nd.dentry->d_inode->i_zombie); in sys_pivot_root()
942 if (d_unhashed(old_nd.dentry) && !IS_ROOT(old_nd.dentry)) in sys_pivot_root()
945 if (new_nd.mnt == user_nd.mnt || old_nd.mnt == user_nd.mnt) in sys_pivot_root()
952 tmp = old_nd.mnt; /* make sure we can reach put_old from new_root */ in sys_pivot_root()
964 } else if (!is_subdir(old_nd.dentry, new_nd.dentry)) in sys_pivot_root()
968 attach_mnt(user_nd.mnt, &old_nd); in sys_pivot_root()
976 up(&old_nd.dentry->d_inode->i_zombie); in sys_pivot_root()
979 path_release(&old_nd); in sys_pivot_root()