Message ID | 20220801012251.1959147-1-yukuai1@huaweicloud.com |
---|---|
State | New |
Headers | show |
Series | [stable,5.4] 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 8e6d7ba95df1..98e363d0025b 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1719,8 +1719,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: