])
#
+# LC_FLUSH_OWNER_ID
+# starting from 2.6.18 the file_operations .flush
+# method has a new "fl_owner_t id" parameter
+#
+AC_DEFUN([LC_FLUSH_OWNER_ID],
+[AC_MSG_CHECKING([if file_operations .flush has an fl_owner_t id])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+],[
+ struct file_operations *fops = NULL;
+ fl_owner_t id;
+ int i;
+
+ i = fops->flush(NULL, id);
+],[
+ AC_DEFINE(HAVE_FLUSH_OWNER_ID, 1,
+ [file_operations .flush method has an fl_owner_t id])
+ AC_MSG_RESULT([yes])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
+#
# LC_STATFS_DENTRY_PARAM
# starting from 2.6.18 linux kernel uses dentry instead of
# super_block for first vfs_statfs argument
LC_UMOUNTBEGIN_HAS_VFSMOUNT
LC_INODE_IPRIVATE
LC_EXPORT_FILEMAP_FDATAWRITE_RANGE
+ LC_FLUSH_OWNER_ID
if test x$enable_server = xyes ; then
LC_EXPORT_INVALIDATE_MAPPING_PAGES
fi
RETURN(retval);
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,5)
-int ll_flush(struct file *file)
-#else
+#ifdef HAVE_FLUSH_OWNER_ID
int ll_flush(struct file *file, fl_owner_t id)
+#else
+int ll_flush(struct file *file)
#endif
{
struct inode *inode = file->f_dentry->d_inode;