]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
block: fix queue locking verification
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 17:16:38 +0000 (10:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 17:16:38 +0000 (10:16 -0700)
commit8f45c1a58a25c3a1a2f42521445e1e786c4c0b92
treef3557e803eb0b31fba027fe22c0afe1dfa3c6d4f
parent25a025863e024f6b86b48137b10b4960c50351b0
block: fix queue locking verification

The new queue_flag_set/clear() functions verify that the queue is
locked, but in doing so they will actually instead oops if the queue
lock hasn't been initialized at all.

So fix the lock debug test to consider the "no lock" case to be
unlocked.  This way you get a nice WARN_ON_ONCE() instead of a fatal
oops.

Bug introduced by commit 75ad23bc0fcb4f992a5d06982bf0857ab1738e9e
("block: make queue flags non-atomic").

Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/blkdev.h