2012-10-12 19:20:58 +04:00
|
|
|
dnl #
|
|
|
|
dnl # 3.6 API change
|
|
|
|
dnl #
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE_NAMEIDATA], [
|
|
|
|
ZFS_LINUX_TEST_SRC([create_nameidata], [
|
2012-10-12 19:20:58 +04:00
|
|
|
#include <linux/fs.h>
|
2018-02-15 23:58:23 +03:00
|
|
|
#include <linux/sched.h>
|
2013-02-15 03:54:04 +04:00
|
|
|
|
2012-10-12 19:20:58 +04:00
|
|
|
#ifdef HAVE_MKDIR_UMODE_T
|
2013-02-15 03:54:04 +04:00
|
|
|
int inode_create(struct inode *inode ,struct dentry *dentry,
|
|
|
|
umode_t umode, struct nameidata *nidata) { return 0; }
|
2012-10-12 19:20:58 +04:00
|
|
|
#else
|
2013-02-15 03:54:04 +04:00
|
|
|
int inode_create(struct inode *inode,struct dentry *dentry,
|
|
|
|
int umode, struct nameidata * nidata) { return 0; }
|
2012-10-12 19:20:58 +04:00
|
|
|
#endif
|
2013-02-15 03:54:04 +04:00
|
|
|
|
|
|
|
static const struct inode_operations
|
|
|
|
iops __attribute__ ((unused)) = {
|
2012-10-12 19:20:58 +04:00
|
|
|
.create = inode_create,
|
|
|
|
};
|
2019-10-01 22:50:34 +03:00
|
|
|
],[])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_CREATE_NAMEIDATA], [
|
|
|
|
AC_MSG_CHECKING([whether iops->create() passes nameidata])
|
|
|
|
ZFS_LINUX_TEST_RESULT([create_nameidata], [
|
2012-10-12 19:20:58 +04:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_CREATE_NAMEIDATA, 1,
|
2019-10-01 22:50:34 +03:00
|
|
|
[iops->create() passes nameidata])
|
2012-10-12 19:20:58 +04:00
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
])
|