2012-10-12 19:20:58 +04:00
|
|
|
dnl #
|
|
|
|
dnl # 3.6 API change
|
|
|
|
dnl #
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_CREATE_NAMEIDATA], [
|
2015-07-15 20:54:26 +03:00
|
|
|
AC_MSG_CHECKING([whether iops->create() passes nameidata])
|
2012-10-12 19:20:58 +04:00
|
|
|
ZFS_LINUX_TRY_COMPILE([
|
|
|
|
#include <linux/fs.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,
|
|
|
|
};
|
2013-02-15 03:54:04 +04:00
|
|
|
],[
|
2012-10-12 19:20:58 +04:00
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_CREATE_NAMEIDATA, 1,
|
2015-07-15 20:54:26 +03:00
|
|
|
[iops->create() passes nameidata])
|
2012-10-12 19:20:58 +04:00
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
])
|