Whamcloud - gitweb
LU-18011 pcc: fix build failure in ->fileattr_set() 71/55671/4
authorQian Yingjin <qian@ddn.com>
Tue, 9 Jul 2024 08:31:45 +0000 (04:31 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 17 Jul 2024 15:22:44 +0000 (15:22 +0000)
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 <qian@ddn.com>
Change-Id: Ib79d79fa1aa6e99719d1658cdc4c03e1fa1ea064
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55671
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/pcc.c

index c80aafb..10c221f 100644 (file)
@@ -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;