1 From: Mike Christie <michaelc@cs.wisc.edu>
2 Date: Thu, 9 Apr 2009 15:57:10 -0500
3 Subject: scsi_lib.c: fix q->lock not held warning when target is busy
4 X-Git: b4efdd586bc08cdf5977cad0a90091f44546a930
7 We cannot call blk_plug_device from scsi_target_queue_ready
8 because the q lock is not held. And we do not need to call
9 it from there because when we return 0, the scsi_request_fn
10 not_ready handling will plug the queue for us if needed.
12 Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
13 Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
14 Signed-off-by: Hannes Reinecke <hare@suse.de>
16 diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
17 index d1cb64a..bb218c8 100644
18 --- a/drivers/scsi/scsi_lib.c
19 +++ b/drivers/scsi/scsi_lib.c
20 @@ -1291,10 +1291,8 @@ static inline int scsi_target_queue_ready(struct Scsi_Host *shost,
21 if (--starget->target_blocked == 0) {
22 SCSI_LOG_MLQUEUE(3, starget_printk(KERN_INFO, starget,
23 "unblocking target at zero depth\n"));
25 - blk_plug_device(sdev->request_queue);
31 if (scsi_target_is_busy(starget)) {