Stop accessing ns.count directly.
Signed-off-by: Christian Brauner <brauner@kernel.org>
---
fs/nsfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nsfs.c b/fs/nsfs.c
index 8484bc4dd3de..dc0a4404b971 100644
--- 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;
}
--
2.47.3