[SCSI] fix q->lock not held warning when target is busy
authorMike Christie <michaelc@cs.wisc.edu>
Thu, 9 Apr 2009 20:57:10 +0000 (15:57 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 27 Apr 2009 14:48:10 +0000 (09:48 -0500)
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.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/scsi_lib.c

index d1cb64ad1a3f373092d954804fa41cca636ccfcd..bb218c8b6e98373344d1c188982a189a7aecbbf9 100644 (file)
@@ -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)) {
This page took 0.02752 seconds and 5 git commands to generate.