+# 2.6.36 fs_struct.lock use spinlock instead of rwlock.
+#
+AC_DEFUN([LC_FS_STRUCT_RWLOCK],
+[AC_MSG_CHECKING([if fs_struct.lock use rwlock])
+LB_LINUX_TRY_COMPILE([
+ #include <asm/atomic.h>
+ #include <linux/spinlock.h>
+ #include <linux/fs_struct.h>
+],[
+ ((struct fs_struct *)0)->lock = (rwlock_t){ 0 };
+],[
+ AC_DEFINE(HAVE_FS_STRUCT_RWLOCK, 1,
+ [fs_struct.lock use rwlock])
+ AC_MSG_RESULT([yes])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
+#
+# 2.6.36 super_operations add evict_inode method. it hybird of
+# delete_inode & clear_inode.
+#
+AC_DEFUN([LC_SBOPS_EVICT_INODE],
+[AC_MSG_CHECKING([if super_operations.evict_inode exist])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+],[
+ ((struct super_operations *)0)->evict_inode(NULL);
+],[
+ AC_DEFINE(HAVE_SBOPS_EVICT_INODE, 1,
+ [super_operations.evict_inode() is exist in kernel])
+ AC_MSG_RESULT([yes])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
+#
+# 2.6.35 file_operations.fsync taken 2 arguments.
+#
+AC_DEFUN([LC_FILE_FSYNC],
+[AC_MSG_CHECKING([if file_operations.fsync taken 2 arguments])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+],[
+ ((struct file_operations *)0)->fsync(NULL, 0);
+],[
+ AC_DEFINE(HAVE_FILE_FSYNC_2ARGS, 1,
+ [file_operations.fsync taken 2 arguments])
+ AC_MSG_RESULT([yes])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
+#
+# 2.6.38 export blkdev_get_by_dev
+#
+AC_DEFUN([LC_BLKDEV_GET_BY_DEV],
+[LB_CHECK_SYMBOL_EXPORT([blkdev_get_by_dev],
+[fs/block_dev.c],[
+AC_DEFINE(HAVE_BLKDEV_GET_BY_DEV, 1,
+ [blkdev_get_by_dev is exported by the kernel])
+],[
+])
+])
+
+#
+# 2.6.38 vfsmount.mnt_count doesn't use atomic_t
+#
+AC_DEFUN([LC_ATOMIC_MNT_COUNT],
+[AC_MSG_CHECKING([if vfsmount.mnt_count is atomic_t])
+LB_LINUX_TRY_COMPILE([
+ #include <asm/atomic.h>
+ #include <linux/fs.h>
+ #include <linux/mount.h>
+],[
+ ((struct vfsmount *)0)->mnt_count = ((atomic_t) { 0 });
+],[
+ AC_DEFINE(HAVE_ATOMIC_MNT_COUNT, 1,
+ [vfsmount.mnt_count is atomic_t])
+ AC_MSG_RESULT([yes])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
+#
+# 2.6.38 use path as 4th parameter in quota_on.
+#
+AC_DEFUN([LC_QUOTA_ON_USE_PATH],
+[AC_MSG_CHECKING([quota_on use path as parameter])
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
+LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ #include <linux/quota.h>
+],[
+ ((struct quotactl_ops *)0)->quota_on(NULL, 0, 0, ((struct path*)0));
+],[
+ AC_DEFINE(HAVE_QUOTA_ON_USE_PATH, 1,
+ [quota_on use path as 4th paramter])
+ AC_MSG_RESULT([yes])
+],[
+ AC_MSG_RESULT([no])
+])
+EXTRA_KCFLAGS="$tmp_flags"
+])
+
+#