aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-03 12:31:55 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 09:22:36 -0400
commit2476b4d0426e1d6d4a42b2f7ae08f668b2cfe510 (patch)
tree72ec0e163229be6674a8fe110d49dea2546dad55 /drivers/scsi/scsi_lib.c
parent92c299d11acd3f3e75a721acb8f57c457d5c394f (diff)
[SCSI] fix locking in host use of blk_plug_device()
scsi_lib.c:scsi_host_queue_ready() plugs the device with incorrect locking. It should actually have the queue lock held, but it's holding the host lock. Fix this by eliminating the call. The host ready has no need to plug the queue because if it returns 0 in scsi_request_function control transfers to not_ready which acquires the queue lock and plugs the device if its at zero depth. Reported-by: Elias Oltmanns <eo@nebensachen.de> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index aa8d5de58839..0451903452e6 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1328,7 +1328,6 @@ static inline int scsi_host_queue_ready(struct request_queue *q,
1328 printk("scsi%d unblocking host at zero depth\n", 1328 printk("scsi%d unblocking host at zero depth\n",
1329 shost->host_no)); 1329 shost->host_no));
1330 } else { 1330 } else {
1331 blk_plug_device(q);
1332 return 0; 1331 return 0;
1333 } 1332 }
1334 } 1333 }