diff options
author | Christian Brauner <brauner@kernel.org> | 2025-09-18 12:11:47 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-09-19 16:22:36 +0200 |
commit | 2e9e6972279fec7dd352ff05abe596e55988ec41 (patch) | |
tree | 791bece8bd6b96ab2d7593dc61b2511c64626767 /fs/namespace.c | |
parent | 224ef741ce87aa6474b82e0eb76e0e8e1bafe544 (diff) |
mnt: 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 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index b9f94769ec11..9109069d85cd 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2110,7 +2110,7 @@ struct mnt_namespace *get_sequential_mnt_ns(struct mnt_namespace *mntns, bool pr * the mount namespace and it might already be on its * deathbed. */ - if (!refcount_inc_not_zero(&mntns->ns.count)) + if (!ns_ref_get(mntns)) continue; return mntns; @@ -6084,7 +6084,7 @@ void __init mnt_init(void) void put_mnt_ns(struct mnt_namespace *ns) { - if (!refcount_dec_and_test(&ns->ns.count)) + if (!ns_ref_put(ns)) return; namespace_lock(); emptied_ns = ns; |