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