From f5e76dea03453c72fb46ad90dd2e01c73b70654f Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 19 Oct 2011 18:04:40 +0200 Subject: [PATCH] Cleaned up MUTEX() #define The old define assumed a specific layout of the kmutex_t struct. This patch makes the macro independent from the actual struct layout. Signed-off-by: Brian Behlendorf --- include/sys/mutex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 21f161cfbe..b41b3cead0 100644 --- a/include/sys/mutex.h +++ b/include/sys/mutex.h @@ -101,7 +101,7 @@ extern int spl_mutex_spin_max(void); # define spl_mutex_spin_max() 0 #endif /* HAVE_TASK_CURR */ -#define MUTEX(mp) ((struct mutex *)(mp)) +#define MUTEX(mp) (&((mp)->m_mutex)) static inline void spl_mutex_set_owner(kmutex_t *mp)