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

time: 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/time_namespace.h
··· 44 44 45 45 static inline struct time_namespace *get_time_ns(struct time_namespace *ns) 46 46 { 47 - refcount_inc(&ns->ns.count); 47 + ns_ref_inc(ns); 48 48 return ns; 49 49 } 50 50 ··· 57 57 58 58 static inline void put_time_ns(struct time_namespace *ns) 59 59 { 60 - if (refcount_dec_and_test(&ns->ns.count)) 60 + if (ns_ref_put(ns)) 61 61 free_time_ns(ns); 62 62 } 63 63