From 6b4ef5cab9911fe902e02058ac7622db05379f25 Mon Sep 17 00:00:00 2001 From: Qian Yingjin Date: Tue, 26 Mar 2024 04:37:16 -0400 Subject: [PATCH] LU-17674 build: use nop_mnt_idmap in inode_owner_or_capable The build on kernel 6.7 reported the following errors: if (!inode_owner_or_capable(&init_user_ns, inode)) ^~~~~~~~~~~~~ note: expected 'struct mnt_idmap *' but argument is of type 'struct user_namespace *' It replaces &init_user_ns with "nop_mnt_idmap" to fix the build failure on new kernel. Test-Parameters: trivial Fixes: ce98bfe5f72 ("LU-10499 pcc: add readonly mode for PCC") Signed-off-by: Qian Yingjin Change-Id: I758ef5a074bb6449b2d703865010974d5135f241 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54572 Reviewed-by: Oleg Drokin Reviewed-by: Jian Yu Reviewed-by: Shaun Tancheff Tested-by: jenkins Tested-by: Maloo --- lustre/llite/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 6260687..668b870d 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -4757,7 +4757,7 @@ out_ladvise: if (!S_ISREG(inode->i_mode)) RETURN(-EINVAL); - if (!inode_owner_or_capable(&init_user_ns, inode)) + if (!inode_owner_or_capable(&nop_mnt_idmap, inode)) RETURN(-EPERM); OBD_ALLOC_PTR(attach); -- 1.8.3.1