]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/scsi-dont-call-blk_plug_device-from-scsi_target_queue_ready
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / scsi-dont-call-blk_plug_device-from-scsi_target_queue_ready
CommitLineData
82094b55
AF
1From: Mike Christie <michaelc@cs.wisc.edu>
2Date: Thu, 9 Apr 2009 15:57:10 -0500
3Subject: scsi_lib.c: fix q->lock not held warning when target is busy
4X-Git: b4efdd586bc08cdf5977cad0a90091f44546a930
5References: bnc#541403
6
7We cannot call blk_plug_device from scsi_target_queue_ready
8because the q lock is not held. And we do not need to call
9it from there because when we return 0, the scsi_request_fn
10not_ready handling will plug the queue for us if needed.
11
12Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
13Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
14Signed-off-by: Hannes Reinecke <hare@suse.de>
15
16diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
17index 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"));
24- } else {
25- blk_plug_device(sdev->request_queue);
26+ } else
27 return 0;
28- }
29 }
30
31 if (scsi_target_is_busy(starget)) {