Lines Matching refs:ns
83 struct ns_common ns; member
122 struct user_namespace *ns; member
132 bool setup_userns_sysctls(struct user_namespace *ns);
133 void retire_userns_sysctls(struct user_namespace *ns);
134 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type);
136 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid);
152 static inline long get_userns_rlimit_max(struct user_namespace *ns, enum rlimit_type type) in get_userns_rlimit_max() argument
154 return READ_ONCE(ns->rlimit_max[type]); in get_userns_rlimit_max()
157 static inline void set_userns_rlimit_max(struct user_namespace *ns, in set_userns_rlimit_max() argument
160 ns->rlimit_max[type] = max <= LONG_MAX ? max : LONG_MAX; in set_userns_rlimit_max()
165 static inline struct user_namespace *get_user_ns(struct user_namespace *ns) in get_user_ns() argument
167 if (ns) in get_user_ns()
168 refcount_inc(&ns->ns.count); in get_user_ns()
169 return ns; in get_user_ns()
174 extern void __put_user_ns(struct user_namespace *ns);
176 static inline void put_user_ns(struct user_namespace *ns) in put_user_ns() argument
178 if (ns && refcount_dec_and_test(&ns->ns.count)) in put_user_ns()
179 __put_user_ns(ns); in put_user_ns()
191 extern bool userns_may_setgroups(const struct user_namespace *ns);
195 struct ns_common *ns_get_owner(struct ns_common *ns);
198 static inline struct user_namespace *get_user_ns(struct user_namespace *ns) in get_user_ns() argument
216 static inline void put_user_ns(struct user_namespace *ns) in put_user_ns() argument
220 static inline bool userns_may_setgroups(const struct user_namespace *ns) in userns_may_setgroups() argument
236 static inline struct ns_common *ns_get_owner(struct ns_common *ns) in ns_get_owner() argument