[RFC PATCH 3/4] xfs: replace ns_capable_noaudit()

cem at kernel.org cem at kernel.org
Fri Jun 26 11:45:22 UTC 2026


From: Carlos Maiolino <cem at kernel.org>

We don't need to use ns_capable_noaudit() as all we care is the initial
user namespace, use capable_noaudit() instead.

Signed-off-by: Carlos Maiolino <cmaiolino at redhat.com>
---
 fs/xfs/xfs_trans_dquot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c
index 50e5b323f7f1..30c2f6ec0aac 100644
--- a/fs/xfs/xfs_trans_dquot.c
+++ b/fs/xfs/xfs_trans_dquot.c
@@ -835,7 +835,7 @@ xfs_trans_dqresv(
 	if ((flags & XFS_QMOPT_FORCE_RES) == 0 &&
 	    dqp->q_id &&
 	    xfs_dquot_is_enforced(dqp) &&
-	    !ns_capable_noaudit(&init_user_ns, CAP_SYS_RESOURCE)) {
+	    !capable_noaudit(CAP_SYS_RESOURCE)) {
 		int		quota_nl;
 		bool		fatal;
 
-- 
2.54.0




More information about the Linux-security-module-archive mailing list