Linux 3.6: kmap_atomic API change
[openafs.git] / src / cf / linux-test4.m4
index efe1b5a..fefa40e 100644 (file)
@@ -414,6 +414,22 @@ struct dentry _d;
 ])
 
 
+int (*fsync) (struct file *, loff_t start, loff_t end, int datasync);
+
+AC_DEFUN([LINUX_FOP_F_FSYNC_TAKES_RANGE], [
+  AC_CHECK_LINUX_BUILD([whether file_operations.fsync takes a range],
+                      [ac_cv_linux_func_f_fsync_takes_range],
+                      [#include <linux/fs.h>],
+[struct inode _inode;
+struct file _file;
+loff_t start, end;
+(void)_inode.i_fop->fsync(&_file, start, end, 0);],
+                      [FOP_FSYNC_TAKES_RANGE],
+                      [define if your fops.fsync takes range arguments],
+                      [])
+])
+
+
 AC_DEFUN([LINUX_HAVE_KMEM_CACHE_T], [
   AC_CHECK_LINUX_BUILD([whether kmem_cache_t exists],
                       [ac_cv_linux_have_kmem_cache_t],
@@ -594,3 +610,70 @@ AC_DEFUN([LINUX_D_COUNT_IS_INT], [
                        [define if dentry->d_count is an int],
                        [-Werror])
 ])
+
+
+AC_DEFUN([LINUX_DOP_D_DELETE_TAKES_CONST], [
+  AC_CHECK_LINUX_BUILD([whether dentry.d_op->d_delete takes a const argument],
+                       [ac_cv_linux_dop_d_delete_takes_const],
+                       [#include <linux/fs.h>
+                       #include <linux/dcache.h>],
+                       [struct dentry_operations _d_ops;
+                       int _d_del(const struct dentry *de) {return 0;};
+                       _d_ops.d_delete = _d_del;],
+                       [DOP_D_DELETE_TAKES_CONST],
+                       [define if dentry.d_op->d_delete takes a const argument],
+                       [-Werror])
+])
+
+
+AC_DEFUN([LINUX_IOP_MKDIR_TAKES_UMODE_T], [
+  AC_CHECK_LINUX_BUILD([whether inode.i_op->mkdir takes a umode_t argument],
+                       [ac_cv_linux_iop_mkdir_takes_umode_t],
+                       [#include <linux/fs.h>],
+                       [struct inode_operations _i_ops;
+                       int _mkdir(struct inode *i, struct dentry *d, umode_t m) {return 0;};
+                       _i_ops.mkdir = _mkdir;],
+                       [IOP_MKDIR_TAKES_UMODE_T],
+                       [define if inode.i_op->mkdir takes a umode_t argument],
+                       [-Werror])
+])
+
+
+AC_DEFUN([LINUX_IOP_CREATE_TAKES_UMODE_T], [
+  AC_CHECK_LINUX_BUILD([whether inode.i_op->create takes a umode_t argument],
+                       [ac_cv_linux_iop_create_takes_umode_t],
+                       [#include <linux/fs.h>],
+                       [struct inode_operations _i_ops;
+                       int _create(struct inode *i, struct dentry *d, umode_t m, struct nameidata *n)
+                               {return 0;};
+                       _i_ops.create = _create;],
+                       [IOP_CREATE_TAKES_UMODE_T],
+                       [define if inode.i_op->create takes a umode_t argument],
+                       [-Werror])
+])
+
+
+AC_DEFUN([LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES], [
+  AC_CHECK_LINUX_BUILD([whether export operation encode_fh takes inode arguments],
+                       [ac_cv_linux_export_op_encode_fh__takes_inodes],
+                       [#include <linux/exportfs.h>],
+                       [struct export_operations _exp_ops;
+                       int _encode_fh(struct inode *i, __u32 *fh, int *len, struct inode *p)
+                               {return 0;};
+                       _exp_ops.encode_fh = _encode_fh;],
+                       [EXPORT_OP_ENCODE_FH_TAKES_INODES],
+                       [define if encode_fh export op takes inode arguments],
+                       [-Werror])
+])
+
+
+AC_DEFUN([LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE], [
+  AC_CHECK_LINUX_BUILD([whether kmap_atomic takes no km_type argument],
+                       [ac_cv_linux_kma_atomic_takes_no_km_type],
+                       [#include <linux/highmem.h>],
+                       [struct page *p = NULL;
+                       kmap_atomic(p);],
+                       [KMAP_ATOMIC_TAKES_NO_KM_TYPE],
+                       [define if kmap_atomic takes no km_type argument],
+                       [-Werror])
+])