Whamcloud - gitweb
LU-16667 build: fix extra errors related to struct mnt_idmap
authorJian Yu <yujian@whamcloud.com>
Thu, 2 Nov 2023 18:54:42 +0000 (11:54 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 5 Nov 2023 10:45:24 +0000 (10:45 +0000)
commit89f62f7c1d3b972e9eb4aaf4959a97fa5254f77d
treec7aae49fd6d349062ec207a6360025c052cc5a90
parentb4179f6a1a7a1aa801f0fc409520678c398fd9f8
LU-16667 build: fix extra errors related to struct mnt_idmap

This patch fixes the following extra build errors related to
struct mnt_idmap:

lustre/llite/pcc.c:2440:40: error: passing argument 1 of
'inode_owner_or_capable' from incompatible pointer type
[-Werror=incompatible-pointer-types]
 2440 |                 inode_owner_or_capable(&init_user_ns, inode)) ||
      |                                        ^~~~~~~~~~~~~
      |                                        |
      |                                        struct user_namespace *
include/linux/fs.h:1624:47: note: expected 'struct mnt_idmap *'
but argument is of type 'struct user_namespace *'
 1624 | bool inode_owner_or_capable(struct mnt_idmap *idmap,
      |                             ~~~~~~~~~~~~~~~~~~^~~~~
lustre/llite/pcc.c:3656:40: error: passing argument 1 of
'inode->i_op->fileattr_set' from incompatible pointer type
[-Werror=incompatible-pointer-types]
 3656 |         rc = inode->i_op->fileattr_set(&init_user_ns, dentry, &fa);
      |                                        ^~~~~~~~~~~~~
      |                                        |
      |                                        struct user_namespace *
lustre/llite/pcc.c:3656:40: note: expected 'struct mnt_idmap *'
but argument is of type 'struct user_namespace *'

Change-Id: Ia310f6f9053228b38b41243912dfe7818cfef33a
Test-Parameters: trivial
Fixes: 3011aa5 ("LU-16667 build: struct mnt_idmap, linux/filelock.h")
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52955
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/pcc.c