block: add missing blk_queue_dead() checks
authorTejun Heo <tj@kernel.org>
Sun, 7 Dec 2014 19:55:49 +0000 (19:55 +0000)
committerWilly Tarreau <w@1wt.eu>
Sat, 13 Dec 2014 14:16:19 +0000 (15:16 +0100)
commit3b77fc36cefaacba19a48db43ab3b8dc57cbfc1b
treeaa1f5ac019439a7fba2b995420a14f9fdfcd1d02
parentd49465185ef41bea43666e349b72b6d1e1fbd296
block: add missing blk_queue_dead() checks

commit 8ba61435d73f2274e12d4d823fde06735e8f6a54 upstream.

blk_insert_cloned_request(), blk_execute_rq_nowait() and
blk_flush_plug_list() either didn't check whether the queue was dead
or did it without holding queue_lock.  Update them so that dead state
is checked while holding queue_lock.

AFAICS, this plugs all holes (requeue doesn't matter as the request is
transitioning atomically from in_flight to queued).

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
[bwh: Backported to 2.6.32:
 - Drop inapplicable changes to queue_unplugged() and
   blk_flush_plug_list()
 - We don't have blk_queue_dead() so open-code it
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
block/blk-core.c
block/blk-exec.c