mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
3b0ba3ba99
In torvalds/linux@31051c8 the inode_change_ok() function was renamed setattr_prepare() and updated to take a dentry ratheri than an inode. Update the code to call the setattr_prepare() and add a wrapper function which call inode_change_ok() for older kernels. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Requires-spl: refs/pull/581/head
24 lines
611 B
Plaintext
24 lines
611 B
Plaintext
dnl #
|
|
dnl # 4.9 API change
|
|
dnl # The inode_change_ok() function has been renamed setattr_prepare()
|
|
dnl # and updated to take a dentry rather than an inode.
|
|
dnl #
|
|
AC_DEFUN([ZFS_AC_KERNEL_SETATTR_PREPARE],
|
|
[AC_MSG_CHECKING([whether setattr_prepare() is available])
|
|
ZFS_LINUX_TRY_COMPILE_SYMBOL([
|
|
#include <linux/fs.h>
|
|
], [
|
|
struct dentry *dentry = NULL;
|
|
struct iattr *attr = NULL;
|
|
int error;
|
|
|
|
error = setattr_prepare(dentry, attr);
|
|
], [setattr_prepare], [fs/attr.c], [
|
|
AC_MSG_RESULT(yes)
|
|
AC_DEFINE(HAVE_SETATTR_PREPARE, 1,
|
|
[setattr_prepare() is available])
|
|
], [
|
|
AC_MSG_RESULT(no)
|
|
])
|
|
])
|