Skip to content

Commit

Permalink
scsi: sg: remove bad blk_end_request_all() call
Browse files Browse the repository at this point in the history
We just need to free the request here. Additionally, this is currently
wrong for a queue that's using MQ currently, it'll crash.

Cc: Doug Gilbert <dgilbert@interlog.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
axboe authored and martinkpetersen committed Oct 16, 2018
1 parent 8d84927 commit abaf75d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/sg.c
Expand Up @@ -822,7 +822,7 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
if (atomic_read(&sdp->detaching)) {
if (srp->bio) {
scsi_req_free_cmd(scsi_req(srp->rq));
blk_end_request_all(srp->rq, BLK_STS_IOERR);
blk_put_request(srp->rq);
srp->rq = NULL;
}

Expand Down

0 comments on commit abaf75d

Please sign in to comment.