Skip to content

Commit 0befb87

Browse files
johnpgarrymartinkpetersen
authored andcommitted
scsi: scsi_debug: Drop check for num_in_q exceeding queue depth
The per-device num_in_q value cannot exceed the device queue depth, so drop the check. Signed-off-by: John Garry <john.g.garry@oracle.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Link: https://lore.kernel.org/r/20230313093114.1498305-9-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 9c23038 commit 0befb87

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

drivers/scsi/scsi_debug.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5593,15 +5593,8 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip,
55935593
}
55945594
num_in_q = atomic_read(&devip->num_in_q);
55955595
qdepth = cmnd->device->queue_depth;
5596-
if (unlikely((qdepth > 0) && (num_in_q >= qdepth))) {
5597-
if (scsi_result) {
5598-
spin_unlock_irqrestore(&sqp->qc_lock, iflags);
5599-
goto respond_in_thread;
5600-
} else
5601-
scsi_result = device_qfull_result;
5602-
} else if (unlikely(sdebug_every_nth &&
5603-
(SDEBUG_OPT_RARE_TSF & sdebug_opts) &&
5604-
(scsi_result == 0))) {
5596+
if (unlikely(sdebug_every_nth && (SDEBUG_OPT_RARE_TSF & sdebug_opts) &&
5597+
(scsi_result == 0))) {
56055598
if ((num_in_q == (qdepth - 1)) &&
56065599
(atomic_inc_return(&sdebug_a_tsf) >=
56075600
abs(sdebug_every_nth))) {

0 commit comments

Comments
 (0)