Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

uts: port to ns_ref_*() helpers

Stop accessing ns.count directly.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>

+2 -2
+2 -2
include/linux/uts_namespace.h
··· 25 25 26 26 static inline void get_uts_ns(struct uts_namespace *ns) 27 27 { 28 - refcount_inc(&ns->ns.count); 28 + ns_ref_inc(ns); 29 29 } 30 30 31 31 extern struct uts_namespace *copy_utsname(unsigned long flags, ··· 34 34 35 35 static inline void put_uts_ns(struct uts_namespace *ns) 36 36 { 37 - if (refcount_dec_and_test(&ns->ns.count)) 37 + if (ns_ref_put(ns)) 38 38 free_uts_ns(ns); 39 39 } 40 40