summaryrefslogtreecommitdiff
path: root/include/linux/time_namespace.h
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-09-18 13:11:51 +0300
committerChristian Brauner <brauner@kernel.org>2025-09-19 17:22:37 +0300
commite0c173f1fa02c0b08720aa8aa0cc91c3063146ae (patch)
tree704efddb93d68a278e082fce0ca1c87b41813670 /include/linux/time_namespace.h
parent07897b38eadf5a370a6001790239f23036d5b970 (diff)
downloadlinux-e0c173f1fa02c0b08720aa8aa0cc91c3063146ae.tar.xz
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>
Diffstat (limited to 'include/linux/time_namespace.h')
-rw-r--r--include/linux/time_namespace.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/time_namespace.h b/include/linux/time_namespace.h
index a47a4ce4183e..f3b9567cf1f4 100644
--- a/include/linux/time_namespace.h
+++ b/include/linux/time_namespace.h
@@ -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);
}