summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2016-10-19 11:19:17 -0700
committerBrian Behlendorf <[email protected]>2016-10-20 09:39:09 -0700
commit0fedeedd309eca62d15fffd8bd811e2b12660e21 (patch)
tree702f555518ecbc3ecd3ae6c72ad727433f27d5dd /config
parentb8d9e26440ade0edebfa98af8cb9371810c1aeaf (diff)
Linux 4.9 compat: remove iops->{set,get,remove}xattr
In Linux 4.9, torvalds/linux@fd50eca, iops->{set,get,remove}xattr and generic_{set,get,remove}xattr are removed. xattr operations will directly go through sb->s_xattr. Signed-off-by: Chunwei Chen <[email protected]>
Diffstat (limited to 'config')
-rw-r--r--config/kernel-xattr-handler.m425
-rw-r--r--config/kernel.m41
2 files changed, 26 insertions, 0 deletions
diff --git a/config/kernel-xattr-handler.m4 b/config/kernel-xattr-handler.m4
index ce18eaf9c..300cb0ba8 100644
--- a/config/kernel-xattr-handler.m4
+++ b/config/kernel-xattr-handler.m4
@@ -58,6 +58,31 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_NAME], [
])
dnl #
+dnl # 4.9 API change,
+dnl # iops->{set,get,remove}xattr and generic_{set,get,remove}xattr are
+dnl # removed. xattr operations will directly go through sb->s_xattr.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_HAVE_GENERIC_SETXATTR], [
+ AC_MSG_CHECKING([whether generic_setxattr() exists])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ #include <linux/xattr.h>
+
+ static const struct inode_operations
+ iops __attribute__ ((unused)) = {
+ .setxattr = generic_setxattr
+ };
+ ],[
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GENERIC_SETXATTR, 1,
+ [generic_setxattr() exists])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
+
+dnl #
dnl # Supported xattr handler get() interfaces checked newest to oldest.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET], [
diff --git a/config/kernel.m4 b/config/kernel.m4
index 37635256b..66e97c250 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -104,6 +104,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_KUID_HELPERS
ZFS_AC_KERNEL_MODULE_PARAM_CALL_CONST
ZFS_AC_KERNEL_RENAME_WANTS_FLAGS
+ ZFS_AC_KERNEL_HAVE_GENERIC_SETXATTR
AS_IF([test "$LINUX_OBJ" != "$LINUX"], [
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"