Whamcloud - gitweb
LU-506 kernel: remove BKL
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index a63a2fc..1e12c28 100644 (file)
@@ -1865,6 +1865,24 @@ LB_LINUX_TRY_COMPILE([
 ])
 
 #
+# 2.6.37 remove kernel_locked
+#
+AC_DEFUN([LC_KERNEL_LOCKED],
+[AC_MSG_CHECKING([if kernel_locked is defined])
+LB_LINUX_TRY_COMPILE([
+        #include <linux/smp_lock.h>
+],[
+        kernel_locked();
+],[
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(HAVE_KERNEL_LOCKED, 1,
+                [kernel_locked is defined])
+],[
+        AC_MSG_RESULT([no])
+])
+])
+
+#
 # 2.6.38 export blkdev_get_by_dev
 #
 AC_DEFUN([LC_BLKDEV_GET_BY_DEV],
@@ -2117,6 +2135,9 @@ AC_DEFUN([LC_PROG_LINUX],
          LC_FS_STRUCT_RWLOCK
          LC_SBOPS_EVICT_INODE
 
+         # 2.6.37
+         LC_KERNEL_LOCKED
+
          # 2.6.38
          LC_ATOMIC_MNT_COUNT
          LC_BLKDEV_GET_BY_DEV