Commit b4efdd58 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley
Browse files

[SCSI] fix q->lock not held warning when target is busy



We cannot call blk_plug_device from scsi_target_queue_ready
because the q lock is not held. And we do not need to call
it from there because when we return 0, the scsi_request_fn
not_ready handling will plug the queue for us if needed.

Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent e832b3ca
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1291,11 +1291,9 @@ static inline int scsi_target_queue_ready(struct Scsi_Host *shost,
		if (--starget->target_blocked == 0) {
			SCSI_LOG_MLQUEUE(3, starget_printk(KERN_INFO, starget,
					 "unblocking target at zero depth\n"));
		} else {
			blk_plug_device(sdev->request_queue);
		} else
			return 0;
	}
	}

	if (scsi_target_is_busy(starget)) {
		if (list_empty(&sdev->starved_entry)) {