Lines Matching refs:ns_common

152 static inline struct ns_common *node_to_ns(const struct rb_node *node)  in node_to_ns()
156 return rb_entry(node, struct ns_common, ns_tree_node.ns_node); in node_to_ns()
159 static inline struct ns_common *node_to_ns_unified(const struct rb_node *node) in node_to_ns_unified()
163 return rb_entry(node, struct ns_common, ns_unified_node.ns_node); in node_to_ns_unified()
166 static inline struct ns_common *node_to_ns_owner(const struct rb_node *node) in node_to_ns_owner()
170 return rb_entry(node, struct ns_common, ns_owner_node.ns_node); in node_to_ns_owner()
197 void __ns_tree_add_raw(struct ns_common *ns, struct ns_tree_root *ns_tree) in __ns_tree_add_raw()
219 struct ns_common *owner = &user_ns->ns; in __ns_tree_add_raw()
233 void __ns_tree_remove(struct ns_common *ns, struct ns_tree_root *ns_tree) in __ns_tree_remove()
253 struct ns_common *owner = &user_ns->ns; in __ns_tree_remove()
265 const struct ns_common *ns = node_to_ns(node); in ns_find()
277 const struct ns_common *ns = node_to_ns_unified(node); in ns_find_unified()
310 static struct ns_common *__ns_unified_tree_lookup_rcu(u64 ns_id) in __ns_unified_tree_lookup_rcu()
325 static struct ns_common *__ns_tree_lookup_rcu(u64 ns_id, int ns_type) in __ns_tree_lookup_rcu()
345 struct ns_common *ns_tree_lookup_rcu(u64 ns_id, int ns_type) in ns_tree_lookup_rcu()
365 struct ns_common *__ns_tree_adjoined_rcu(struct ns_common *ns, in __ns_tree_adjoined_rcu()
379 return list_entry_rcu(list, struct ns_common, ns_tree_node.ns_list_entry); in __ns_tree_adjoined_rcu()
392 u64 __ns_tree_gen_id(struct ns_common *ns, u64 id) in __ns_tree_gen_id()
411 struct ns_common *first_ns;
465 static struct ns_common *lookup_ns_owner_at(u64 ns_id, struct ns_common *owner) in lookup_ns_owner_at()
467 struct ns_common *ret = NULL; in lookup_ns_owner_at()
476 struct ns_common *ns; in lookup_ns_owner_at()
494 static struct ns_common *lookup_ns_id(u64 mnt_ns_id, int ns_type) in lookup_ns_id()
496 struct ns_common *ns; in lookup_ns_id()
510 const struct ns_common *ns) in ns_requested()
516 struct ns_common *ns) in may_list_ns()
522 struct ns_common *owner; in may_list_ns()
546 static inline void ns_put(struct ns_common *ns) in ns_put()
552 DEFINE_FREE(ns_put, struct ns_common *, if (!IS_ERR_OR_NULL(_T)) ns_put(_T))
554 static inline struct ns_common *__must_check legitimize_ns(const struct klistns *kls, in legitimize_ns()
555 struct ns_common *candidate) in legitimize_ns()
557 struct ns_common *ns __free(ns_put) = NULL; in legitimize_ns()
576 struct ns_common *ns = NULL, *first_ns = NULL, *prev = NULL; in do_listns_userns()
612 struct ns_common *valid; in do_listns_userns()
646 static struct ns_common *lookup_ns_id_at(u64 ns_id, int ns_type) in lookup_ns_id_at()
648 struct ns_common *ret = NULL; in lookup_ns_id_at()
666 struct ns_common *ns; in lookup_ns_id_at()
691 static inline struct ns_common *first_ns_common(const struct list_head *head, in first_ns_common()
695 return list_entry_rcu(head->next, struct ns_common, ns_tree_node.ns_list_entry); in first_ns_common()
696 return list_entry_rcu(head->next, struct ns_common, ns_unified_node.ns_list_entry); in first_ns_common()
699 static inline struct ns_common *next_ns_common(struct ns_common *ns, in next_ns_common()
703 …return list_entry_rcu(ns->ns_tree_node.ns_list_entry.next, struct ns_common, ns_tree_node.ns_list_… in next_ns_common()
704 …return list_entry_rcu(ns->ns_unified_node.ns_list_entry.next, struct ns_common, ns_unified_node.ns… in next_ns_common()
707 static inline bool ns_common_is_head(struct ns_common *ns, in ns_common_is_head()
720 struct ns_common *ns, *first_ns = NULL, *prev = NULL; in do_listns()
757 struct ns_common *valid; in do_listns()