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 <qian@ddn.com>
Change-Id: I758ef5a074bb6449b2d703865010974d5135f241
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54572
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
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);