Message ID | 20220730084651.4093719-2-yukuai1@huaweicloud.com |
---|---|
State | Superseded |
Headers | show |
Series | [stable,4.19,1/1] scsi: core: Fix race between handling STS_RESOURCE and completion | expand |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 0191708c9dd4..ace4a7230bcf 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2157,8 +2157,7 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx, case BLK_STS_OK: break; case BLK_STS_RESOURCE: - if (atomic_read(&sdev->device_busy) || - scsi_device_blocked(sdev)) + if (scsi_device_blocked(sdev)) ret = BLK_STS_DEV_RESOURCE; break; default: