mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +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:
@@ -145,6 +145,18 @@ crgetgid(const cred_t *cr)
|
||||
return (KGID_TO_SGID(cr->fsgid));
|
||||
}
|
||||
|
||||
/* Return the initial user ns or nop_mnt_idmap */
|
||||
zidmap_t *
|
||||
zfs_get_init_idmap(void)
|
||||
{
|
||||
#ifdef HAVE_IOPS_CREATE_IDMAP
|
||||
return ((zidmap_t *)&nop_mnt_idmap);
|
||||
#else
|
||||
return ((zidmap_t *)&init_user_ns);
|
||||
#endif
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(zfs_get_init_idmap);
|
||||
EXPORT_SYMBOL(crhold);
|
||||
EXPORT_SYMBOL(crfree);
|
||||
EXPORT_SYMBOL(crgetuid);
|
||||
|
||||
Reference in New Issue
Block a user