]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux 3.6: lookup inode operation API change
authorMarc Dionne <marc.c.dionne@gmail.com>
Tue, 14 Aug 2012 22:26:24 +0000 (18:26 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Sat, 29 Sep 2012 13:41:21 +0000 (06:41 -0700)
The nameidata argument is replaced with an unsigned int flags
argument.

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

Change-Id: Ic8be26141ede6e1c4062872c79a846efb0045bda
Reviewed-on: http://gerrit.openafs.org/8084
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 c089e1397ea00f82662a5eddd1d145b0d198e595..b61f55c6193522fafd69629e4575a5265b5e16f7 100644 (file)
@@ -965,6 +965,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 LINUX_D_ALIAS_IS_HLIST
                 LINUX_IOP_I_CREATE_TAKES_BOOL
                 LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED
+                LINUX_IOP_LOOKUP_TAKES_UNSIGNED
 
                 dnl If we are guaranteed that keyrings will work - that is
                 dnl  a) The kernel has keyrings enabled
index 03dcaf8a972765c94daca7ccfdbf8e5f469ec90b..b1ce5df49d4927d706db921a96ae37403113b2ed 100644 (file)
@@ -1240,7 +1240,10 @@ afs_linux_create(struct inode *dip, struct dentry *dp, int mode)
 
 /* afs_linux_lookup */
 static struct dentry *
-#ifdef IOP_LOOKUP_TAKES_NAMEIDATA
+#if defined(IOP_LOOKUP_TAKES_UNSIGNED)
+afs_linux_lookup(struct inode *dip, struct dentry *dp,
+                unsigned flags)
+#elif defined(IOP_LOOKUP_TAKES_NAMEIDATA)
 afs_linux_lookup(struct inode *dip, struct dentry *dp,
                 struct nameidata *nd)
 #else
index 4a6ec025ee47151e09343f06f28ca4040c93e98a..fc0149f21344f67723ef83a99c7d380eed57fe26 100644 (file)
@@ -741,3 +741,17 @@ AC_DEFUN([LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED], [
                       [define if your dops.d_revalidate takes an unsigned int argument],
                       [-Werror])
 ])
+
+
+AC_DEFUN([LINUX_IOP_LOOKUP_TAKES_UNSIGNED], [
+  AC_CHECK_LINUX_BUILD([whether inode operation lookup takes an unsigned int],
+                       [ac_cv_linux_func_lookup_takes_unsigned],
+                       [#include <linux/fs.h>
+                       #include <linux/namei.h>],
+                       [struct inode_operations iops;
+                       struct dentry *look(struct inode *i, struct dentry *d, unsigned int j) { return NULL; };
+                       iops.lookup = look;],
+                      [IOP_LOOKUP_TAKES_UNSIGNED],
+                      [define if your iops.lookup takes an unsigned int argument],
+                      [-Werror])
+])