SHA256
1
0
forked from pool/openafs
openafs/4f1d810.diff
Christof Hanke 074981dc71 Accepting request 1126478 from home:hauky:branches:filesystems
- apply upstream-patches for kernel 6.6: 
  * 5b647bf.diff
  * 6413fdb.diff
  * 4f1d810.diff
- replace upstream-patch for kernel 6.5 474750a.diff by correct commit 
  6de0a64.diffa for branch openafs-stable-1_8_x

OBS-URL: https://build.opensuse.org/request/show/1126478
OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=113
2023-11-15 05:33:04 +00:00

85 lines
3.2 KiB
Diff

From 4f1d8104d17d2b4e95c7abaf5498db6b80aefa8f Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Mon, 18 Sep 2023 12:23:01 -0600
Subject: [PATCH] Linux 6.6: Pass request_mask to generic_fillattr
The Linux 6.6 commit: "fs: pass the request_mask to generic_fillattr"
(0d72b92883) added an additional parameter to Linux's
generic_fillattr() function.
For openafs, generic_fillattr() is called from the inode_operations
method "getattr", which is implemented in afs_linux_getattr(). The value
for the request_mask parameter is an existing parameter that is passed
to the inode_operations "getattr" method.
Add an autoconf test for 4 parameters to the generic_fillattr function
and update afs_linux_getattr() to pass the request_mask to
generic_fillattr().
Reviewed-on: https://gerrit.openafs.org/15561
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Kailas Zadbuke <kailashsz@in.ibm.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 4fed232b80fb1ad6c0e1dfb42ed8d8e1e6821dd7)
Change-Id: I5cddc56c5e605a6c5e4f7f3691eafec8ca589d2c
Reviewed-on: https://gerrit.openafs.org/15590
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 932fd9d..d5fab97 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -1195,7 +1195,11 @@
{
int err = afs_linux_revalidate(path->dentry);
if (!err) {
+# if defined(GENERIC_FILLATTR_TAKES_REQUEST_MASK)
+ generic_fillattr(afs_mnt_idmap, request_mask, path->dentry->d_inode, stat);
+# else
generic_fillattr(afs_mnt_idmap, path->dentry->d_inode, stat);
+# endif
}
return err;
}
diff --git a/src/cf/linux-kernel-assorted.m4 b/src/cf/linux-kernel-assorted.m4
index b3a11bc..49827d5 100644
--- a/src/cf/linux-kernel-assorted.m4
+++ b/src/cf/linux-kernel-assorted.m4
@@ -58,6 +58,7 @@
LINUX_D_INVALIDATE_IS_VOID
LINUX_KERNEL_READ_OFFSET_IS_LAST
LINUX_KEYRING_SEARCH_TAKES_RECURSE
+LINUX_GENERIC_FILLATTR_TAKES_REQUEST_MASK
])
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
index 1e4dcaf..3596b6a 100644
--- a/src/cf/linux-test4.m4
+++ b/src/cf/linux-test4.m4
@@ -854,3 +854,16 @@
[define if your keyring_search has the recurse parameter],
[])
])
+
+dnl Linux 6.6 added the 'request_mask' parameter to generic_fillattr.
+AC_DEFUN([LINUX_GENERIC_FILLATTR_TAKES_REQUEST_MASK], [
+ AC_CHECK_LINUX_BUILD([whether generic_fillattr has the request_mask parameter],
+ [ac_cv_linux_func_generic_fillattr_takes_request_mask],
+ [#include <linux/fs.h>],
+ [
+ generic_fillattr(NULL, 0, NULL, NULL);
+ ],
+ [GENERIC_FILLATTR_TAKES_REQUEST_MASK],
+ [define if your generic_fillattr has the request_mask_parameter],
+ [])
+])