nsfs: 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:
Christian Brauner 2025-09-18 12:11:58 +02:00
parent 99d33ce100
commit b3d8ff0679
No known key found for this signature in database
GPG key ID: 91C61BC06578DCA2

View file

@ -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;
}