• Tejun Heo's avatar
    block: add missing blk_queue_dead() checks · 3b77fc36
    Tejun Heo authored
    commit 8ba61435 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: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens 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: default avatarBen Hutchings <ben@decadent.org.uk>
    Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
    3b77fc36
blk-core.c 67 KB