mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
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>
This commit is contained in:
parent
07897b38ea
commit
e0c173f1fa
|
|
@ -44,7 +44,7 @@ extern void timens_commit(struct task_struct *tsk, struct time_namespace *ns);
|
|||
|
||||
static inline struct time_namespace *get_time_ns(struct time_namespace *ns)
|
||||
{
|
||||
refcount_inc(&ns->ns.count);
|
||||
ns_ref_inc(ns);
|
||||
return ns;
|
||||
}
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ struct page *find_timens_vvar_page(struct vm_area_struct *vma);
|
|||
|
||||
static inline void put_time_ns(struct time_namespace *ns)
|
||||
{
|
||||
if (refcount_dec_and_test(&ns->ns.count))
|
||||
if (ns_ref_put(ns))
|
||||
free_time_ns(ns);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user