]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux 3.6: create inode operation API change
authorMarc Dionne <marc.c.dionne@gmail.com>
Tue, 14 Aug 2012 21:28:50 +0000 (17:28 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Sat, 29 Sep 2012 13:41:01 +0000 (06:41 -0700)
The nameidata argument is dropped and a flag is added.

Reviewed-on: http://gerrit.openafs.org/7985
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 020e32779c103817ca89caa51259fb53bc3dde79)

Change-Id: Iae2a0301a1c4acb6835eb0bdca6ae22b143b2cda
Reviewed-on: http://gerrit.openafs.org/8082
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
acinclude.m4
src/afs/LINUX/osi_vnodeops.c
src/cf/linux-test4.m4

index d3fb4cb350980ef4e6cbf2e4e828851a4a1a7445..f776062790a624fad1f46fb25e86bd729a011720 100644 (file)
@@ -963,6 +963,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 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
index be95fd31ad0a7d4e000aeabb0ae74aafff97d564..60a828e4d93a87a5f9a1e5013b6dc24ccb7b8895 100644 (file)
@@ -1187,17 +1187,18 @@ struct dentry_operations afs_dentry_operations = {
  * 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();
index 6b70059d092e017baa4a9423055e545b2cf12624..dc30770bc6a0dca56a3e96ab0da4c641b82fd08b 100644 (file)
@@ -712,3 +712,18 @@ AC_DEFUN([LINUX_D_ALIAS_IS_HLIST], [
                        [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])
+])