aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs/zpl_xattr.c
diff options
context:
space:
mode:
authorColeman Kane <[email protected]>2021-03-20 00:00:59 -0400
committerGitHub <[email protected]>2021-03-19 21:00:59 -0700
commite2a8296131e94ad785f5564156ed2db1fdb2e080 (patch)
treea06b88b9027c0d410c34bfc9691e89e0a212e2a6 /module/os/linux/zfs/zpl_xattr.c
parent330c6c052314b530e5b271bc731d4040570c5fb0 (diff)
Linux 5.12 compat: idmapped mounts
In Linux 5.12, the filesystem API was modified to support ipmapped mounts by adding a "struct user_namespace *" parameter to a number functions and VFS handlers. This change adds the needed autoconf macros to detect the new interfaces and updates the code appropriately. This change does not add support for idmapped mounts, instead it preserves the existing behavior by passing the initial user namespace where needed. A subsequent commit will be required to add support for idmapped mounted. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #11712
Diffstat (limited to 'module/os/linux/zfs/zpl_xattr.c')
-rw-r--r--module/os/linux/zfs/zpl_xattr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/os/linux/zfs/zpl_xattr.c b/module/os/linux/zfs/zpl_xattr.c
index 83812f2dc..971cd6ad0 100644
--- a/module/os/linux/zfs/zpl_xattr.c
+++ b/module/os/linux/zfs/zpl_xattr.c
@@ -1233,7 +1233,7 @@ __zpl_xattr_acl_set_access(struct inode *ip, const char *name,
if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
return (-EOPNOTSUPP);
- if (!inode_owner_or_capable(ip))
+ if (!zpl_inode_owner_or_capable(kcred->user_ns, ip))
return (-EPERM);
if (value) {
@@ -1273,7 +1273,7 @@ __zpl_xattr_acl_set_default(struct inode *ip, const char *name,
if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
return (-EOPNOTSUPP);
- if (!inode_owner_or_capable(ip))
+ if (!zpl_inode_owner_or_capable(kcred->user_ns, ip))
return (-EPERM);
if (value) {