diff options
| author | Matthew Garrett <mjg@redhat.com> | 2010-05-17 12:11:21 -0400 |
|---|---|---|
| committer | Matthew Garrett <mjg@redhat.com> | 2010-05-17 12:11:21 -0400 |
| commit | a1e66dd0515c8cfa72b8e2a3834d59548cf84ba5 (patch) | |
| tree | e1e1edf210c8dde6edbdfa32ed6ff59ac553729b /lib/rwsem.c | |
| parent | d89d63a973986bf6c1d8b28ab62eb61491a3bb34 (diff) | |
| parent | 6c62673cf58516e1b82329ac90ebf3ff3f485672 (diff) | |
Merge branch 'x86-platform-next' into x86-platform
Diffstat (limited to 'lib/rwsem.c')
| -rw-r--r-- | lib/rwsem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rwsem.c b/lib/rwsem.c index 3e3365e5665e..ceba8e28807a 100644 --- a/lib/rwsem.c +++ b/lib/rwsem.c | |||
| @@ -136,9 +136,10 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading) | |||
| 136 | out: | 136 | out: |
| 137 | return sem; | 137 | return sem; |
| 138 | 138 | ||
| 139 | /* undo the change to count, but check for a transition 1->0 */ | 139 | /* undo the change to the active count, but check for a transition |
| 140 | * 1->0 */ | ||
| 140 | undo: | 141 | undo: |
| 141 | if (rwsem_atomic_update(-RWSEM_ACTIVE_BIAS, sem) != 0) | 142 | if (rwsem_atomic_update(-RWSEM_ACTIVE_BIAS, sem) & RWSEM_ACTIVE_MASK) |
| 142 | goto out; | 143 | goto out; |
| 143 | goto try_again; | 144 | goto try_again; |
| 144 | } | 145 | } |
