mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 6.3 compat: idmapped mount API changes
Linux kernel 6.3 changed a bunch of APIs to use the dedicated idmap type for mounts (struct mnt_idmap), we need to detect these changes and make zfs work with the new APIs. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Youzhong Yang <yyang@mathworks.com> Closes #14682
This commit is contained in:
@@ -172,14 +172,14 @@ zfs_access(znode_t *zp, int mode, int flag, cred_t *cr)
|
||||
if (flag & V_ACE_MASK)
|
||||
#if defined(__linux__)
|
||||
error = zfs_zaccess(zp, mode, flag, B_FALSE, cr,
|
||||
kcred->user_ns);
|
||||
zfs_init_idmap);
|
||||
#else
|
||||
error = zfs_zaccess(zp, mode, flag, B_FALSE, cr,
|
||||
NULL);
|
||||
#endif
|
||||
else
|
||||
#if defined(__linux__)
|
||||
error = zfs_zaccess_rwx(zp, mode, flag, cr, kcred->user_ns);
|
||||
error = zfs_zaccess_rwx(zp, mode, flag, cr, zfs_init_idmap);
|
||||
#else
|
||||
error = zfs_zaccess_rwx(zp, mode, flag, cr, NULL);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user