mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 19:57:43 +03:00
Linux 6.6 compat: generic_fillattr has a new u32 request_mask added at arg2
In commit 0d72b92883c651a11059d93335f33d65c6eb653b, a new u32 argument for the request_mask was added to generic_fillattr. This is the same request_mask for statx that's present in the most recent API implemented by zpl_getattr_impl. This commit conditionally adds it to the zpl_generic_fillattr(...) macro, as well as the zfs_getattr_fast(...) implementation, when configure determines it's present in the kernel's generic_fillattr(...). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes #15263
This commit is contained in:
committed by
Brian Behlendorf
parent
b37f29341b
commit
01d00dfa9e
@@ -124,6 +124,8 @@ zpl_root_getattr_impl(const struct path *path, struct kstat *stat,
|
||||
generic_fillattr(user_ns, ip, stat);
|
||||
#elif defined(HAVE_GENERIC_FILLATTR_IDMAP)
|
||||
generic_fillattr(user_ns, ip, stat);
|
||||
#elif defined(HAVE_GENERIC_FILLATTR_IDMAP_REQMASK)
|
||||
generic_fillattr(user_ns, request_mask, ip, stat);
|
||||
#else
|
||||
(void) user_ns;
|
||||
#endif
|
||||
@@ -435,6 +437,8 @@ zpl_snapdir_getattr_impl(const struct path *path, struct kstat *stat,
|
||||
generic_fillattr(user_ns, ip, stat);
|
||||
#elif defined(HAVE_GENERIC_FILLATTR_IDMAP)
|
||||
generic_fillattr(user_ns, ip, stat);
|
||||
#elif defined(HAVE_GENERIC_FILLATTR_IDMAP_REQMASK)
|
||||
generic_fillattr(user_ns, request_mask, ip, stat);
|
||||
#else
|
||||
(void) user_ns;
|
||||
#endif
|
||||
@@ -609,6 +613,8 @@ zpl_shares_getattr_impl(const struct path *path, struct kstat *stat,
|
||||
generic_fillattr(user_ns, path->dentry->d_inode, stat);
|
||||
#elif defined(HAVE_GENERIC_FILLATTR_IDMAP)
|
||||
generic_fillattr(user_ns, path->dentry->d_inode, stat);
|
||||
#elif defined(HAVE_GENERIC_FILLATTR_IDMAP_REQMASK)
|
||||
generic_fillattr(user_ns, request_mask, ip, stat);
|
||||
#else
|
||||
(void) user_ns;
|
||||
#endif
|
||||
@@ -623,7 +629,10 @@ zpl_shares_getattr_impl(const struct path *path, struct kstat *stat,
|
||||
|
||||
error = -zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp);
|
||||
if (error == 0) {
|
||||
#if (defined(HAVE_USERNS_IOPS_GETATTR) || defined(HAVE_IDMAP_IOPS_GETATTR))
|
||||
#ifdef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK
|
||||
error = -zfs_getattr_fast(user_ns, request_mask, ZTOI(dzp),
|
||||
stat);
|
||||
#elif (defined(HAVE_USERNS_IOPS_GETATTR) || defined(HAVE_IDMAP_IOPS_GETATTR))
|
||||
error = -zfs_getattr_fast(user_ns, ZTOI(dzp), stat);
|
||||
#else
|
||||
error = -zfs_getattr_fast(kcred->user_ns, ZTOI(dzp), stat);
|
||||
|
||||
Reference in New Issue
Block a user