Fix compilation error due to undefined ACCESS_ONCE macro.

When CONFIG_DEBUG_MUTEXES is turned on in RHEL5's kernel config, the mutexes
store the owner for debugging purposes, therefore the SPL will enable
HAVE_MUTEX_OWNER. However, the SPL code uses ACCESS_ONCE() to access the
owner, and this macro is not defined in the RHEL5 kernel, therefore we define it
ourselves in include/linux/compiler_compat.h.

Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Ricardo M. Correia
2010-07-20 13:47:37 -07:00
committed by Brian Behlendorf
parent b17edc10a9
commit 22cd0f19b1
2 changed files with 48 additions and 0 deletions
+1
View File
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <linux/mutex.h>
#include <linux/compiler_compat.h>
typedef enum {
MUTEX_DEFAULT = 0,