diff options
Diffstat (limited to 'include/spl/sys/mutex.h')
-rw-r--r-- | include/spl/sys/mutex.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/spl/sys/mutex.h b/include/spl/sys/mutex.h index f906d49d4..ed0cd4932 100644 --- a/include/spl/sys/mutex.h +++ b/include/spl/sys/mutex.h @@ -28,6 +28,7 @@ #include <sys/types.h> #include <linux/mutex.h> #include <linux/lockdep.h> +#include <linux/compiler_compat.h> typedef enum { MUTEX_DEFAULT = 0, @@ -59,7 +60,7 @@ spl_mutex_clear_owner(kmutex_t *mp) mp->m_owner = NULL; } -#define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner)) +#define mutex_owner(mp) (READ_ONCE((mp)->m_owner)) #define mutex_owned(mp) (mutex_owner(mp) == current) #define MUTEX_HELD(mp) mutex_owned(mp) #define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) |