From 8be44699fcab490627c04fe036a04e8b2ffeadae Mon Sep 17 00:00:00 2001 From: Michel Lespinasse Date: Wed, 12 May 2010 11:38:45 +0100 Subject: [PATCH] --- yaml --- r: 190799 b: refs/heads/master c: 91af70814105f4c05e6e11b51c3269907b71794b h: refs/heads/master i: 190797: e27b54adcfef3ca105c7a06aabf170ac07df7e90 190795: e513b6498666468dbb2637f201a661695f493d05 190791: 89c845d2b3e8b260da5fcb93295d0a09f193a318 190783: 6abd9c204a57fd955713fe0e521506e5383cd807 v: v3 --- [refs] | 2 +- trunk/lib/rwsem.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 0220eee99676..6ae2f54e1bf0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cea0d767c29669bf89f86e4aee46ef462d2ebae8 +refs/heads/master: 91af70814105f4c05e6e11b51c3269907b71794b diff --git a/trunk/lib/rwsem.c b/trunk/lib/rwsem.c index 3e3365e5665e..ceba8e28807a 100644 --- a/trunk/lib/rwsem.c +++ b/trunk/lib/rwsem.c @@ -136,9 +136,10 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading) out: return sem; - /* undo the change to count, but check for a transition 1->0 */ + /* undo the change to the active count, but check for a transition + * 1->0 */ undo: - if (rwsem_atomic_update(-RWSEM_ACTIVE_BIAS, sem) != 0) + if (rwsem_atomic_update(-RWSEM_ACTIVE_BIAS, sem) & RWSEM_ACTIVE_MASK) goto out; goto try_again; }