]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
nsfs: port to ns_ref_*() helpers
authorChristian Brauner <brauner@kernel.org>
Thu, 18 Sep 2025 10:11:58 +0000 (12:11 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 19 Sep 2025 14:22:38 +0000 (16:22 +0200)
Stop accessing ns.count directly.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/nsfs.c

index 8484bc4dd3debce80fbeb13972c4b13357f89a30..dc0a4404b9718ebd19a0138f33ecee9bb3f82a5d 100644 (file)
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -492,7 +492,7 @@ static struct dentry *nsfs_fh_to_dentry(struct super_block *sb, struct fid *fh,
                VFS_WARN_ON_ONCE(ns->ops->type != fid->ns_type);
                VFS_WARN_ON_ONCE(ns->inum != fid->ns_inum);
 
-               if (!refcount_inc_not_zero(&ns->count))
+               if (!__ns_ref_get(ns))
                        return NULL;
        }