Whamcloud - gitweb
forget about one configure check
authorshadow <shadow>
Tue, 3 Mar 2009 17:09:57 +0000 (17:09 +0000)
committershadow <shadow>
Tue, 3 Mar 2009 17:09:57 +0000 (17:09 +0000)
Branch b1_8
b=14250

lustre/autoconf/lustre-core.m4

index a588f35..86adfe8 100644 (file)
@@ -1529,6 +1529,27 @@ LB_LINUX_TRY_COMPILE([
 ])
 ])
 
+# 2.6.27 and some older have mapping->tree_lock as spin_lock
+AC_DEFUN([LC_RW_TREE_LOCK],
+[AC_MSG_CHECKING([mapping->tree_lock is rw_lock])
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
+LB_LINUX_TRY_COMPILE([
+       #include <linux/fs.h>
+],[
+       struct address_space *map = NULL;
+       
+       write_lock_irq(&map->tree_lock);
+],[
+        AC_MSG_RESULT(yes)
+        AC_DEFINE(HAVE_RW_TREE_LOCK, 1,
+                [mapping->tree_lock is rw_lock])
+],[
+        AC_MSG_RESULT(no)
+])
+EXTRA_KCFLAGS="$tmp_flags"
+])
+
 #
 # LC_PROG_LINUX
 #
@@ -1655,6 +1676,7 @@ AC_DEFUN([LC_PROG_LINUX],
           LC_INODE_PERMISION_2ARGS
           LC_FILE_REMOVE_SUID
           LC_TRYLOCKPAGE
+         LC_RW_TREE_LOCK
 ])
 
 #