blk-throttle: use queue_is_locked() instead of lockdep_is_held()
authorJens Axboe <axboe@kernel.dk>
Tue, 25 Oct 2011 13:51:48 +0000 (15:51 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 25 Oct 2011 13:51:48 +0000 (15:51 +0200)
We can't use the latter if !CONFIG_LOCKDEP.

Reported-by: Sedat Dilek <sedat.dilek@googlemail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c

index 8edb9499b509b9dc8439d98530d31665e9afca04..4553245d93175bc34ddd83966e640161ca81e89f 100644 (file)
@@ -1218,7 +1218,7 @@ void blk_throtl_drain(struct request_queue *q)
        struct bio_list bl;
        struct bio *bio;
 
-       lockdep_is_held(q->queue_lock);
+       WARN_ON_ONCE(!queue_is_locked(q));
 
        bio_list_init(&bl);