Lines Matching refs:old
1054 static struct mount *clone_mnt(struct mount *old, struct dentry *root, in clone_mnt() argument
1057 struct super_block *sb = old->mnt.mnt_sb; in clone_mnt()
1061 mnt = alloc_vfsmnt(old->mnt_devname); in clone_mnt()
1068 mnt->mnt_group_id = old->mnt_group_id; in clone_mnt()
1076 mnt->mnt.mnt_flags = old->mnt.mnt_flags; in clone_mnt()
1080 mnt->mnt.mnt_userns = mnt_user_ns(&old->mnt); in clone_mnt()
1092 ((flag & CL_SHARED_TO_SLAVE) && IS_MNT_SHARED(old))) { in clone_mnt()
1093 list_add(&mnt->mnt_slave, &old->mnt_slave_list); in clone_mnt()
1094 mnt->mnt_master = old; in clone_mnt()
1097 if ((flag & CL_MAKE_SHARED) || IS_MNT_SHARED(old)) in clone_mnt()
1098 list_add(&mnt->mnt_share, &old->mnt_share); in clone_mnt()
1099 if (IS_MNT_SLAVE(old)) in clone_mnt()
1100 list_add(&mnt->mnt_slave, &old->mnt_slave); in clone_mnt()
1101 mnt->mnt_master = old->mnt_master; in clone_mnt()
1111 if (!list_empty(&old->mnt_expire)) in clone_mnt()
1112 list_add(&mnt->mnt_expire, &old->mnt_expire); in clone_mnt()
2072 unsigned int mounts = 0, old, pending, sum; in count_mounts() local
2078 old = ns->mounts; in count_mounts()
2080 sum = old + pending; in count_mounts()
2081 if ((old > sum) || in count_mounts()
2350 struct mount *mnt = ERR_PTR(-EINVAL), *old = real_mount(old_path->mnt); in __do_loopback() local
2352 if (IS_MNT_UNBINDABLE(old)) in __do_loopback()
2355 if (!check_mnt(old) && old_path->dentry->d_op != &ns_dentry_operations) in __do_loopback()
2358 if (!recurse && has_locked_children(old, old_path->dentry)) in __do_loopback()
2362 mnt = copy_tree(old, old_path->dentry, CL_COPY_MNT_NS_FILE); in __do_loopback()
2364 mnt = clone_mnt(old, old_path->dentry, 0); in __do_loopback()
2785 struct mount *old; in do_move_mount() local
2795 old = real_mount(old_path->mnt); in do_move_mount()
2797 parent = old->mnt_parent; in do_move_mount()
2798 attached = mnt_has_parent(old); in do_move_mount()
2799 old_mp = old->mnt_mp; in do_move_mount()
2800 ns = old->mnt_ns; in do_move_mount()
2808 if (!is_mounted(&old->mnt)) in do_move_mount()
2812 if (!(attached ? check_mnt(old) : is_anon_ns(ns))) in do_move_mount()
2815 if (old->mnt.mnt_flags & MNT_LOCKED) in do_move_mount()
2833 if (IS_MNT_SHARED(p) && tree_contains_unbindable(old)) in do_move_mount()
2836 if (!check_for_nsfs_mounts(old)) in do_move_mount()
2839 if (p == old) in do_move_mount()
2842 err = attach_recursive_mnt(old, real_mount(new_path->mnt), mp, in do_move_mount()
2849 list_del_init(&old->mnt_expire); in do_move_mount()
3423 struct mount *old; in copy_mnt_ns() local
3434 old = ns->root; in copy_mnt_ns()
3445 new = copy_tree(old, old->mnt.mnt_root, copy_flags); in copy_mnt_ns()
3464 p = old; in copy_mnt_ns()
3479 p = next_mnt(p, old); in copy_mnt_ns()
3484 p = next_mnt(p, old); in copy_mnt_ns()
3836 struct path new, old, root; in SYSCALL_DEFINE2() local
3850 LOOKUP_FOLLOW | LOOKUP_DIRECTORY, &old); in SYSCALL_DEFINE2()
3854 error = security_sb_pivotroot(&old, &new); in SYSCALL_DEFINE2()
3859 old_mp = lock_mount(&old); in SYSCALL_DEFINE2()
3867 old_mnt = real_mount(old.mnt); in SYSCALL_DEFINE2()
3894 if (!is_path_reachable(old_mnt, old.dentry, &new)) in SYSCALL_DEFINE2()
3925 path_put(&old); in SYSCALL_DEFINE2()