diff --git a/config/kernel-acl.m4 b/config/kernel-acl.m4 index e53b546af..090381858 100644 --- a/config/kernel-acl.m4 +++ b/config/kernel-acl.m4 @@ -21,34 +21,6 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T], [ ]) ]) -dnl # -dnl # 4.8 API change, -dnl # The function posix_acl_valid now must be passed a namespace. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_VALID_WITH_NS], [ - ZFS_LINUX_TEST_SRC([posix_acl_valid_with_ns], [ - #include - #include - ],[ - struct user_namespace *user_ns = NULL; - const struct posix_acl *acl = NULL; - int error; - - error = posix_acl_valid(user_ns, acl); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS], [ - AC_MSG_CHECKING([whether posix_acl_valid() wants user namespace]) - ZFS_LINUX_TEST_RESULT([posix_acl_valid_with_ns], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_POSIX_ACL_VALID_WITH_NS, 1, - [posix_acl_valid() wants user namespace]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 3.1 API change, dnl # Check if inode_operations contains the function get_acl @@ -226,7 +198,6 @@ AC_DEFUN([ZFS_AC_KERNEL_ACL_HAS_REFCOUNT], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [ ZFS_AC_KERNEL_SRC_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T - ZFS_AC_KERNEL_SRC_POSIX_ACL_VALID_WITH_NS ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL ZFS_AC_KERNEL_SRC_ACL_HAS_REFCOUNT @@ -234,7 +205,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [ AC_DEFUN([ZFS_AC_KERNEL_ACL], [ ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T - ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL ZFS_AC_KERNEL_ACL_HAS_REFCOUNT diff --git a/include/os/linux/kernel/linux/vfs_compat.h b/include/os/linux/kernel/linux/vfs_compat.h index aa8f4cc97..affd6caa0 100644 --- a/include/os/linux/kernel/linux/vfs_compat.h +++ b/include/os/linux/kernel/linux/vfs_compat.h @@ -161,18 +161,6 @@ zpl_posix_acl_release(struct posix_acl *acl) zpl_posix_acl_release_impl(acl); #endif } - -/* - * 4.8 API change, - * posix_acl_valid() now must be passed a namespace, the namespace from - * from super block associated with the given inode is used for this purpose. - */ -#ifdef HAVE_POSIX_ACL_VALID_WITH_NS -#define zpl_posix_acl_valid(ip, acl) posix_acl_valid(ip->i_sb->s_user_ns, acl) -#else -#define zpl_posix_acl_valid(ip, acl) posix_acl_valid(acl) -#endif - #endif /* CONFIG_FS_POSIX_ACL */ static inline uid_t zfs_uid_read_impl(struct inode *ip) diff --git a/module/os/linux/zfs/zpl_xattr.c b/module/os/linux/zfs/zpl_xattr.c index f272054e0..dc0113d38 100644 --- a/module/os/linux/zfs/zpl_xattr.c +++ b/module/os/linux/zfs/zpl_xattr.c @@ -1329,7 +1329,7 @@ __zpl_xattr_acl_set_access(zidmap_t *mnt_ns, if (IS_ERR(acl)) return (PTR_ERR(acl)); else if (acl) { - error = zpl_posix_acl_valid(ip, acl); + error = posix_acl_valid(ip->i_sb->s_user_ns, acl); if (error) { zpl_posix_acl_release(acl); return (error); @@ -1375,7 +1375,7 @@ __zpl_xattr_acl_set_default(zidmap_t *mnt_ns, if (IS_ERR(acl)) return (PTR_ERR(acl)); else if (acl) { - error = zpl_posix_acl_valid(ip, acl); + error = posix_acl_valid(ip->i_sb->s_user_ns, acl); if (error) { zpl_posix_acl_release(acl); return (error);