From: Gunnar Beutner Date: Wed, 19 Oct 2011 16:04:40 +0000 (+0200) Subject: Cleaned up MUTEX() #define X-Git-Tag: spl-0.6.0-rc7~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5e76dea03453c72fb46ad90dd2e01c73b70654f;p=spl 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 --- diff --git a/include/sys/mutex.h b/include/sys/mutex.h index 21f161c..b41b3ce 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)