diff options
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 | } | 
