Linux 2.6.35 compat: filp_fsync() dropped 'stuct dentry *'

The prototype for filp_fsync() drop the unused argument 'stuct dentry *'.
I've fixed this by adding the needed autoconf check and moving all of
those filp related functions to file_compat.h.  This will simplify
handling any further API changes in the future.
This commit is contained in:
Brian Behlendorf
2010-07-14 11:26:54 -07:00
parent 82b8c8fa64
commit f0ff89fc86
6 changed files with 187 additions and 28 deletions
+20
View File
@@ -76,6 +76,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_PUT_TASK_STRUCT
SPL_AC_5ARGS_PROC_HANDLER
SPL_AC_KVASPRINTF
SPL_AC_3ARGS_FILE_FSYNC
])
AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
@@ -1438,3 +1439,22 @@ AC_DEFUN([SPL_AC_KVASPRINTF], [
[kvasprintf() is available])],
[])
])
dnl #
dnl # 2.6.35 API change,
dnl # Unused 'struct dentry *' removed from prototype.
dnl #
AC_DEFUN([SPL_AC_3ARGS_FILE_FSYNC], [
AC_MSG_CHECKING([whether file_fsync() wants 3 args])
SPL_LINUX_TRY_COMPILE([
#include <linux/buffer_head.h>
],[
file_fsync(NULL, NULL, 0);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_3ARGS_FILE_FSYNC, 1,
[file_fsync() wants 3 args])
],[
AC_MSG_RESULT(no)
])
])