From: Qian Yingjin Date: Tue, 9 Jul 2024 08:31:45 +0000 (-0400) Subject: LU-18011 pcc: fix build failure in ->fileattr_set() X-Git-Tag: 2.15.65~69 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=160164fdc2d7a193160cbba6ab783b5d69ead4ce;p=fs%2Flustre-release.git LU-18011 pcc: fix build failure in ->fileattr_set() The build failed on linux-6.8 kernel: rc = inode->i_op->fileattr_set(&init_user_ns, dentry, &fa); ^~~~~~~~~~~~~ | struct user_namespace * pcc.c:3265:40: note: expected 'struct mnt_idmap' but argument is of type 'struct user_namespace'. Replace "&init_user_ns" with "&nop_mnt_idmap" to fix the build error. Fixes: 2d1a906ff11 ("LU-12358 pcc: add project quota support on PCC backend") Test-Parameters: trivial testlist=sanity-pcc Signed-off-by: Qian Yingjin Change-Id: Ib79d79fa1aa6e99719d1658cdc4c03e1fa1ea064 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55671 Tested-by: jenkins Reviewed-by: Oleg Drokin Reviewed-by: James Simmons Reviewed-by: Shuichi Ihara Reviewed-by: Andreas Dilger --- diff --git a/lustre/llite/pcc.c b/lustre/llite/pcc.c index c80aafb..10c221f 100644 --- a/lustre/llite/pcc.c +++ b/lustre/llite/pcc.c @@ -3386,7 +3386,7 @@ static int __pcc_file_reset_projid(struct file *file, __u32 projid) if (!inode->i_op->fileattr_set) return -EOPNOTSUPP; - rc = inode->i_op->fileattr_set(&init_user_ns, dentry, &fa); + rc = inode->i_op->fileattr_set(&nop_mnt_idmap, dentry, &fa); #else struct fsxattr fsx = { .fsx_projid = projid }; mm_segment_t old_fs;