Whamcloud - gitweb
b=18015
authorwangyb <wangyb>
Thu, 4 Jun 2009 09:40:38 +0000 (09:40 +0000)
committerwangyb <wangyb>
Thu, 4 Jun 2009 09:40:38 +0000 (09:40 +0000)
a=adilger
r=zhenyu.xu, sheng.yang

check if synchronize_rcu is available, otherwise use synchronize_kernel

lustre/autoconf/lustre-core.m4
lustre/include/linux/lustre_compat25.h

index cbf9877..7af19f5 100644 (file)
@@ -809,6 +809,17 @@ LB_LINUX_TRY_COMPILE([
 ])
 ])
 
 ])
 ])
 
+# LC_EXPORT_SYNCHRONIZE_RCU
+# after 2.6.12 synchronize_rcu is preferred over synchronize_kernel
+AC_DEFUN([LC_EXPORT_SYNCHRONIZE_RCU],
+[LB_CHECK_SYMBOL_EXPORT([synchronize_rcu],
+[kernel/rcupdate.c],[
+        AC_DEFINE(HAVE_SYNCHRONIZE_RCU, 1,
+                [in 2.6.12 synchronize_rcu preferred over synchronize_kernel])
+],[
+])
+])
+
 # LC_INODE_I_MUTEX
 # after 2.6.15 inode have i_mutex intead of i_sem
 AC_DEFUN([LC_INODE_I_MUTEX],
 # LC_INODE_I_MUTEX
 # after 2.6.15 inode have i_mutex intead of i_sem
 AC_DEFUN([LC_INODE_I_MUTEX],
@@ -1631,6 +1642,7 @@ AC_DEFUN([LC_PROG_LINUX],
 
          # 2.6.12
          LC_RW_TREE_LOCK
 
          # 2.6.12
          LC_RW_TREE_LOCK
+         LC_EXPORT_SYNCHRONIZE_RCU
 
          # 2.6.15
          LC_INODE_I_MUTEX
 
          # 2.6.15
          LC_INODE_I_MUTEX
index 277b8ce..611e5be 100644 (file)
@@ -607,6 +607,10 @@ static inline int ll_crypto_hmac(struct crypto_tfm *tfm,
 #define ll_crypto_tfm_alg_max_keysize  crypto_tfm_alg_max_keysize
 #endif /* HAVE_ASYNC_BLOCK_CIPHER */
 
 #define ll_crypto_tfm_alg_max_keysize  crypto_tfm_alg_max_keysize
 #endif /* HAVE_ASYNC_BLOCK_CIPHER */
 
+#ifndef HAVE_SYNCHRONIZE_RCU
+#define synchronize_rcu() synchronize_kernel()
+#endif
+
 #ifdef HAVE_SECURITY_PLUG
 #define ll_remove_suid(inode,mnt)               remove_suid(inode,mnt)
 #define ll_vfs_rmdir(dir,entry,mnt)             vfs_rmdir(dir,entry,mnt)
 #ifdef HAVE_SECURITY_PLUG
 #define ll_remove_suid(inode,mnt)               remove_suid(inode,mnt)
 #define ll_vfs_rmdir(dir,entry,mnt)             vfs_rmdir(dir,entry,mnt)