Linux 4.9: inode_operation rename now takes flags
[openafs.git] / acinclude.m4
index 0a90e16..f8c8456 100644 (file)
@@ -111,6 +111,11 @@ AC_ARG_ENABLE([pthreaded-ubik],
          enabled)])],
     [],
     [enable_pthreaded_ubik="yes"])
+AC_ARG_ENABLE([ubik-read-while-write],
+    [AS_HELP_STRING([--enable-ubik-read-while-write],
+       [enable vlserver read from db cache during write locks (EXPERIMENTAL)])],
+    [],
+    [enable_ubik_read_while_write="no"])
 
 dnl Kernel module build options.
 AC_ARG_WITH([linux-kernel-headers],
@@ -912,6 +917,12 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                                          [#include <linux/fs.h>],
                                          [void],
                                          [struct inode *inode, void *link_data])
+                AC_CHECK_LINUX_OPERATION([inode_operations], [rename], [takes_flags],
+                                         [#include <linux/fs.h>],
+                                         [int],
+                                         [struct inode *oinode, struct dentry *odentry,
+                                               struct inode *ninode, struct dentry *ndentry,
+                                               unsigned int flags])
 
                 dnl Check for header files
                 AC_CHECK_LINUX_HEADER([config.h])
@@ -935,6 +946,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_STRUCT([ctl_table], [ctl_name], [sysctl.h])
                 AC_CHECK_LINUX_STRUCT([dentry], [d_u.d_alias], [dcache.h])
                 AC_CHECK_LINUX_STRUCT([dentry_operations], [d_automount], [dcache.h])
+                AC_CHECK_LINUX_STRUCT([group_info], [gid], [cred.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_alloc_sem], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_blkbits], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_blksize], [fs.h])
@@ -1409,6 +1421,10 @@ else
 fi
 AC_SUBST(USE_UNIX_SOCKETS)
 
+if test "$enable_ubik_read_while_write" = "yes"; then
+       AC_DEFINE(UBIK_READ_WHILE_WRITE, 1, [define if you want to enable ubik read while write])
+fi
+
 if test "$enable_namei_fileserver" = "yes"; then
        AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
        VFSCK=""
@@ -1593,7 +1609,7 @@ if test "$enable_debug_locks" = yes; then
 fi
 
 if test "$ac_cv_header_security_pam_modules_h" = yes -a "$enable_pam" = yes; then
-       HAVE_PAM="YES"
+       HAVE_PAM="yes"
 else
        HAVE_PAM="no"
 fi