diff options
| author | Christian Brauner <brauner@kernel.org> | 2025-09-18 12:11:49 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-09-19 16:22:37 +0200 |
| commit | d4825c99d6a738c565d5142ce37369368a4352da (patch) | |
| tree | b928c136a5975f60161de0373f8b89197944bead /include/linux/ipc_namespace.h | |
| parent | 06099e374f3ab818f0501671b21493ba2e1b94b9 (diff) | |
ipc: 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/ipc_namespace.h')
| -rw-r--r-- | include/linux/ipc_namespace.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 924e4754374f..21eff63f47da 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h @@ -140,14 +140,14 @@ extern struct ipc_namespace *copy_ipcs(unsigned long flags, static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) { if (ns) - refcount_inc(&ns->ns.count); + ns_ref_inc(ns); return ns; } static inline struct ipc_namespace *get_ipc_ns_not_zero(struct ipc_namespace *ns) { if (ns) { - if (refcount_inc_not_zero(&ns->ns.count)) + if (ns_ref_get(ns)) return ns; } |
