AC_CHECK_LINUX_BUILD([whether inode_operations.permission takes flags],
[ac_cv_linux_func_i_permission_takes_flags],
[#include <linux/fs.h>],
- [struct inode _inode;
+ [struct inode _inode = {0};
unsigned int flags = 0;
(void)_inode.i_op->permission(&_inode, 0, flags);],
[IOP_PERMISSION_TAKES_FLAGS],
])
+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],
AC_DEFUN([LINUX_D_PATH_TAKES_STRUCT_PATH], [
AC_CHECK_LINUX_BUILD([if d_path() takes a struct path argument],
[ac_cv_linux_d_path_takes_struct_path],
- [#include <linux/dcache.h>],
+ [#include <linux/fs.h>],
[struct path *p; d_path(p, NULL, 0);],
[D_PATH_TAKES_STRUCT_PATH],
[define if d_path() takes a struct path argument],
AC_DEFUN([LINUX_HAVE_DCACHE_LOCK], [
AC_CHECK_LINUX_BUILD([for dcache_lock],
[ac_cv_linux_have_dcache_lock],
- [#include <linux/dcache.h> ],
+ [#include <linux/fs.h> ],
[printk("%p", &dcache_lock);],
[HAVE_DCACHE_LOCK],
[define if dcache_lock exists],
AC_DEFUN([LINUX_D_COUNT_IS_INT], [
AC_CHECK_LINUX_BUILD([if dentry->d_count is an int],
[ac_cv_linux_d_count_int],
- [#include <linux/dcache.h> ],
+ [#include <linux/fs.h> ],
[struct dentry _d;
dget(&_d);
_d.d_count = 1;],
[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])
+])