Skip to content

Commit

Permalink
[SCSI] fix locking in host use of blk_plug_device()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Bottomley authored and James Bottomley committed Jul 12, 2008
1 parent 92c299d commit 2476b4d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,6 @@ static inline int scsi_host_queue_ready(struct request_queue *q,
printk("scsi%d unblocking host at zero depth\n",
shost->host_no));
} else {
blk_plug_device(q);
return 0;
}
}
Expand Down

0 comments on commit 2476b4d

Please sign in to comment.