Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Linux 3.2 compat: rw_semaphore.wait_lock is raw #77

Closed
wants to merge 1 commit into from

Conversation

dajhorn
Copy link
Contributor

@dajhorn dajhorn commented Jan 11, 2012

The wait_lock member of the rw_semaphore struct became a raw_spinlock_t
in Linux 3.2 at torvalds/linux@ddb6c9b.

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 *’

Closes: #76
Closes: openzfs/zfs#463

The wait_lock member of the rw_semaphore struct became a raw_spinlock_t
in Linux 3.2 at torvalds/linux@ddb6c9b.

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 *’

Closes: #76
Closes: openzfs/zfs#463
@behlendorf
Copy link
Contributor

Exactly what I had in mind. Thanks, this was merged as commit 588d900

@behlendorf behlendorf closed this Jan 12, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linux 3.2 spinlock compatibility 0.6.0.39 does not build on kernel 3.2
2 participants