diff options
author | Michel Lespinasse <walken@google.com> | 2010-05-12 11:38:45 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-12 18:23:34 -0700 |
commit | 91af70814105f4c05e6e11b51c3269907b71794b (patch) | |
tree | 3857e57d3bccc1638ce2dc0413249cc2f3469d34 /lib/parser.c | |
parent | cea0d767c29669bf89f86e4aee46ef462d2ebae8 (diff) | |
download | kernel_samsung_tuna-91af70814105f4c05e6e11b51c3269907b71794b.zip kernel_samsung_tuna-91af70814105f4c05e6e11b51c3269907b71794b.tar.gz kernel_samsung_tuna-91af70814105f4c05e6e11b51c3269907b71794b.tar.bz2 |
rwsem: Test for no active locks in __rwsem_do_wake undo code
If there are no active threasd using a semaphore, it is always correct
to unqueue blocked threads. This seems to be what was intended in the
undo code.
What was done instead, was to look for a sem count of zero - this is an
impossible situation, given that at least one thread is known to be
queued on the semaphore. The code might be correct as written, but it's
hard to reason about and it's not what was intended (otherwise the goto
out would have been unconditional).
Go for checking the active count - the alternative is not worth the
headache.
Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/parser.c')
0 files changed, 0 insertions, 0 deletions