• Bart Van Assche's avatar
    block: Revert v5.0 blk_mq_request_issue_directly() changes · fd9c40f6
    Bart Van Assche authored
    blk_mq_try_issue_directly() can return BLK_STS*_RESOURCE for requests that
    have been queued. If that happens when blk_mq_try_issue_directly() is called
    by the dm-mpath driver then dm-mpath will try to resubmit a request that is
    already queued and a kernel crash follows. Since it is nontrivial to fix
    blk_mq_request_issue_directly(), revert the blk_mq_request_issue_directly()
    changes that went into kernel v5.0.
    
    This patch reverts the following commits:
    * d6a51a97 ("blk-mq: replace and kill blk_mq_request_issue_directly") # v5.0.
    * 5b7a6f12 ("blk-mq: issue directly with bypass 'false' in blk_mq_sched_insert_requests") # v5.0.
    * 7f556a44
    
     ("blk-mq: refactor the code of issue request directly") # v5.0.
    
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Ming Lei <ming.lei@redhat.com>
    Cc: Jianchao Wang <jianchao.w.wang@oracle.com>
    Cc: Hannes Reinecke <hare@suse.com>
    Cc: Johannes Thumshirn <jthumshirn@suse.de>
    Cc: James Smart <james.smart@broadcom.com>
    Cc: Dongli Zhang <dongli.zhang@oracle.com>
    Cc: Laurence Oberman <loberman@redhat.com>
    Cc: <stable@vger.kernel.org>
    Reported-by: default avatarLaurence Oberman <loberman@redhat.com>
    Tested-by: default avatarLaurence Oberman <loberman@redhat.com>
    Fixes: 7f556a44
    
     ("blk-mq: refactor the code of issue request directly") # v5.0.
    Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    fd9c40f6