Whamcloud - gitweb
b=22418 2.6.32 compat synchronize_rcu already defined
authorBrian J. Murrell <brian.murrell@oracle.com>
Wed, 25 Aug 2010 22:56:05 +0000 (18:56 -0400)
committerJohann Lombardi <johann.lombardi@oracle.com>
Fri, 27 Aug 2010 20:38:32 +0000 (22:38 +0200)
In 2.6.32 kernels when !CONFIG_TREE_PREEMPT_RCU synchronize_rcu is a #define
instead of being exported symbol.  In 2.6.33 kernels it  is an exported as
a symbol regardless of the configure option.  To handle this when the symbol
is not exported use the kernels provided define if available.  Otherwise
fallback to providing our own for older kernels.

o=brian.behlendorf
i=andreas
i=kalpak

lustre/include/linux/lustre_compat25.h

index 66a09de..554bef8 100644 (file)
@@ -452,8 +452,11 @@ int ll_unregister_blkdev(unsigned int dev, const char *name)
 #endif
 
 #ifndef HAVE_SYNCHRONIZE_RCU
+/* Linux 2.6.32 provides define when !CONFIG_TREE_PREEMPT_RCU */
+#ifndef synchronize_rcu
 #define synchronize_rcu() synchronize_kernel()
 #endif
+#endif
 
 #ifdef HAVE_SECURITY_PLUG
 #define ll_vfs_rmdir(dir,entry,mnt)             vfs_rmdir(dir,entry,mnt)