[SCSI] scsi_dh_hp_sw: fix deadlock in start_stop_endio
authorMike Snitzer <snitzer@redhat.com>
Tue, 25 Jan 2011 16:52:17 +0000 (11:52 -0500)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 12 Feb 2011 16:31:04 +0000 (10:31 -0600)
The use of blk_execute_rq_nowait() implies __blk_put_request() is needed
in start_stop_endio() rather than blk_put_request() --
blk_finish_request() is called with queue lock already held.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/device_handler/scsi_dh_hp_sw.c

index e3916641e627883418d18b4eeb94bcbe1ddec018..d0363c8fa348852151c69f4a3e0f0f4d314ae4b4 100644 (file)
@@ -225,7 +225,8 @@ static void start_stop_endio(struct request *req, int error)
                }
        }
 done:
-       blk_put_request(req);
+       req->end_io_data = NULL;
+       __blk_put_request(req->q, req);
        if (h->callback_fn) {
                h->callback_fn(h->callback_data, err);
                h->callback_fn = h->callback_data = NULL;