提交 d88a714b 编写于 作者: S Sarang Radke 提交者: James Bottomley

[SCSI] scsi_transport_fc: Make sure commands are completed when rport is offline

blk_end_request doesn't complete a bidi request
successfully

The unfinished request eventually triggers a panic in
timeout handling routine fc_bsg_job_timeout as
req->special is NULL

Use blk_end_request_all to end the request unconditionally
Signed-off-by: NLalit Chandivade <lalit.chandivade@qlogic.com>
Acked-by: NJames Smart  <james.smart@emulex.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 4ae0a6c1
......@@ -3852,7 +3852,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost,
if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) {
req->errors = -ENXIO;
spin_unlock_irq(q->queue_lock);
blk_end_request(req, -ENXIO, blk_rq_bytes(req));
blk_end_request_all(req, -ENXIO);
spin_lock_irq(q->queue_lock);
continue;
}
......@@ -3862,7 +3862,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost,
ret = fc_req_to_bsgjob(shost, rport, req);
if (ret) {
req->errors = ret;
blk_end_request(req, ret, blk_rq_bytes(req));
blk_end_request_all(req, ret);
spin_lock_irq(q->queue_lock);
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册