Skip to contentSkip to conversation

scsi: fix q->lock not held warning when target is busy

PATCH New [email protected] 1 participant 1 message Apr 9, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: fix q->lock not held warning when target is busy

From: Mike Christie <[email protected]>

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.

---
 drivers/scsi/scsi_lib.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/scsi/scsi_lib.c +1 -3
index d1cb64a..bb218c8 100644
@@ -1291,10 +1291,8 @@ 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)) {
Signature · 1 line
1.6.0.6