Lines Matching refs:kls

5985 static ssize_t do_listmount(struct klistmount *kls, bool reverse)  in do_listmount()  argument
5987 struct mnt_namespace *ns = kls->ns; in do_listmount()
5988 u64 mnt_parent_id = kls->mnt_parent_id; in do_listmount()
5989 u64 last_mnt_id = kls->last_mnt_id; in do_listmount()
5990 u64 *mnt_ids = kls->kmnt_ids; in do_listmount()
5991 size_t nr_mnt_ids = kls->nr_mnt_ids; in do_listmount()
5998 ret = grab_requested_root(ns, &kls->root); in do_listmount()
6003 orig = kls->root; in do_listmount()
6015 if (!is_path_reachable(real_mount(orig.mnt), orig.dentry, &kls->root) && in do_listmount()
6048 static void __free_klistmount_free(const struct klistmount *kls) in __free_klistmount_free() argument
6050 path_put(&kls->root); in __free_klistmount_free()
6051 kvfree(kls->kmnt_ids); in __free_klistmount_free()
6052 mnt_ns_release(kls->ns); in __free_klistmount_free()
6055 static inline int prepare_klistmount(struct klistmount *kls, struct mnt_id_req *kreq, in prepare_klistmount() argument
6065 kls->last_mnt_id = last_mnt_id; in prepare_klistmount()
6067 kls->nr_mnt_ids = nr_mnt_ids; in prepare_klistmount()
6068 kls->kmnt_ids = kvmalloc_array(nr_mnt_ids, sizeof(*kls->kmnt_ids), in prepare_klistmount()
6070 if (!kls->kmnt_ids) in prepare_klistmount()
6076 kls->ns = ns; in prepare_klistmount()
6078 kls->mnt_parent_id = kreq->mnt_id; in prepare_klistmount()
6085 struct klistmount kls __free(klistmount_free) = {}; in SYSCALL_DEFINE4()
6108 ret = prepare_klistmount(&kls, &kreq, nr_mnt_ids); in SYSCALL_DEFINE4()
6112 if (kreq.mnt_ns_id && (kls.ns != current->nsproxy->mnt_ns) && in SYSCALL_DEFINE4()
6113 !ns_capable_noaudit(kls.ns->user_ns, CAP_SYS_ADMIN)) in SYSCALL_DEFINE4()
6121 ret = do_listmount(&kls, (flags & LISTMOUNT_REVERSE)); in SYSCALL_DEFINE4()
6125 if (copy_to_user(mnt_ids, kls.kmnt_ids, ret * sizeof(*mnt_ids))) in SYSCALL_DEFINE4()