Skip to content

Commit c3419fd

Browse files
committed
Merge tag 'mkp-scsi-postmerge' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi
Pull scsi fixes from Martin Petersen: "These two commits were in a separate postmerge branch due to a dependency on changes merged for 5.4 in the block tree. They fix two issues in the intersection of the request cleanup changes from block (b7e9e1f) and the request batching changes (8930a6c) that were made to SCSI during the 5.4 cycle" * tag 'mkp-scsi-postmerge' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi: scsi: core: fix dh and multipathing for SCSI hosts without request batching scsi: core: fix missing .cleanup_rq for SCSI hosts without request batching
2 parents 0e2adab + 6b6fa7a commit c3419fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/scsi/scsi_lib.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1834,6 +1834,7 @@ static const struct blk_mq_ops scsi_mq_ops_no_commit = {
18341834
.init_request = scsi_mq_init_request,
18351835
.exit_request = scsi_mq_exit_request,
18361836
.initialize_rq_fn = scsi_initialize_rq,
1837+
.cleanup_rq = scsi_cleanup_rq,
18371838
.busy = scsi_mq_lld_busy,
18381839
.map_queues = scsi_map_queues,
18391840
};
@@ -1921,7 +1922,8 @@ struct scsi_device *scsi_device_from_queue(struct request_queue *q)
19211922
{
19221923
struct scsi_device *sdev = NULL;
19231924

1924-
if (q->mq_ops == &scsi_mq_ops)
1925+
if (q->mq_ops == &scsi_mq_ops_no_commit ||
1926+
q->mq_ops == &scsi_mq_ops)
19251927
sdev = q->queuedata;
19261928
if (!sdev || !get_device(&sdev->sdev_gendev))
19271929
sdev = NULL;

0 commit comments

Comments
 (0)