summaryrefslogtreecommitdiffstats
path: root/include/sys/mutex.h
diff options
context:
space:
mode:
authorGunnar Beutner <[email protected]>2011-10-19 18:04:40 +0200
committerBrian Behlendorf <[email protected]>2011-10-19 09:59:32 -0700
commitf5e76dea03453c72fb46ad90dd2e01c73b70654f (patch)
treecae9b0dddc51ead54d90c941dbca4d7135b79ad1 /include/sys/mutex.h
parent66cdc93b8c030db70a50563ac26f02301dde30ff (diff)
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 <[email protected]>
Diffstat (limited to 'include/sys/mutex.h')
-rw-r--r--include/sys/mutex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/mutex.h b/include/sys/mutex.h
index 21f161cfb..b41b3cead 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)