The nameidata argument is dropped and a flag is added.
Change-Id: I33692fc506e7eb9b8935a27ff3d10b713dfa6e5e
Reviewed-on: http://gerrit.openafs.org/7985
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE
LINUX_DENTRY_OPEN_TAKES_PATH
LINUX_D_ALIAS_IS_HLIST
+ LINUX_IOP_I_CREATE_TAKES_BOOL
dnl If we are guaranteed that keyrings will work - that is
dnl a) The kernel has keyrings enabled
* name is in kernel space at this point.
*/
static int
-#if defined(IOP_CREATE_TAKES_UMODE_T)
+#if defined(IOP_CREATE_TAKES_BOOL)
+afs_linux_create(struct inode *dip, struct dentry *dp, umode_t mode,
+ bool excl)
+#elif defined(IOP_CREATE_TAKES_UMODE_T)
afs_linux_create(struct inode *dip, struct dentry *dp, umode_t mode,
struct nameidata *nd)
-#else
-#ifdef IOP_CREATE_TAKES_NAMEIDATA
+#elif defined(IOP_CREATE_TAKES_NAMEIDATA)
afs_linux_create(struct inode *dip, struct dentry *dp, int mode,
struct nameidata *nd)
#else
afs_linux_create(struct inode *dip, struct dentry *dp, int mode)
#endif
-#endif
{
struct vattr vattr;
cred_t *credp = crref();
[define if dentry->d_alias is an hlist],
[])
])
+
+
+AC_DEFUN([LINUX_IOP_I_CREATE_TAKES_BOOL], [
+ AC_CHECK_LINUX_BUILD([whether inode_operations.create takes a bool],
+ [ac_cv_linux_func_i_create_takes_bool],
+ [#include <linux/fs.h>
+ #include <linux/namei.h>],
+ [struct inode _inode = {};
+ struct dentry _dentry;
+ bool b = true;
+ (void)_inode.i_op->create(&_inode, &_dentry, 0, b);],
+ [IOP_CREATE_TAKES_BOOL],
+ [define if your iops.create takes a bool argument],
+ [-Werror])
+])