diff options
author | Darik Horn <[email protected]> | 2012-01-11 11:44:34 -0600 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-01-11 16:28:05 -0800 |
commit | 588d900433b03e33e4bbbfee7309bd15f71148fb (patch) | |
tree | f5176c56eb87832d869e9092a710e7d74980d6f7 /spl_config.h.in | |
parent | 5f6c14b1eda9c7b47d11a3b90e78dea6a7f429e0 (diff) |
Linux 3.2 compat: rw_semaphore.wait_lock is raw
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 <[email protected]>
Closes: #76
Closes: zfsonlinux/zfs#463
Diffstat (limited to 'spl_config.h.in')
-rw-r--r-- | spl_config.h.in | 3 |
1 files changed, 3 insertions, 0 deletions
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 |