From 588d900433b03e33e4bbbfee7309bd15f71148fb Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Wed, 11 Jan 2012 11:44:34 -0600 Subject: Linux 3.2 compat: rw_semaphore.wait_lock is raw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The wait_lock member of the rw_semaphore struct became a raw_spinlock_t in Linux 3.2 at torvalds/linux@ddb6c9b58a19edcfac93ac670b066c836ff729f1. Wrap spin_lock_* function calls in a new spl_rwsem_* interface to ensure type safety if raw_spinlock_t becomes architecture specific, and to satisfy these compiler warnings: warning: passing argument 1 of ‘spinlock_check’ from incompatible pointer type [enabled by default] note: expected ‘struct spinlock_t *’ but argument is of type ‘struct raw_spinlock_t *’ Signed-off-by: Brian Behlendorf Closes: #76 Closes: zfsonlinux/zfs#463 --- spl_config.h.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'spl_config.h.in') diff --git a/spl_config.h.in b/spl_config.h.in index 94e28e70d..847da2137 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -271,6 +271,9 @@ /* rwsem_is_locked() acquires sem->wait_lock */ #undef RWSEM_IS_LOCKED_TAKES_WAIT_LOCK +/* struct rw_semaphore member wait_lock is raw_spinlock_t */ +#undef RWSEM_SPINLOCK_IS_RAW + /* Define the project alias string. */ #undef SPL_META_ALIAS -- cgit v1.2.3