aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/scsi_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 003f8cf47cf1..d8d984841534 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1370,7 +1370,8 @@ static void scsi_kill_request(struct request *req, request_queue_t *q)
1370{ 1370{
1371 struct scsi_cmnd *cmd = req->special; 1371 struct scsi_cmnd *cmd = req->special;
1372 1372
1373 spin_unlock(q->queue_lock); 1373 blkdev_dequeue_request(req);
1374
1374 if (unlikely(cmd == NULL)) { 1375 if (unlikely(cmd == NULL)) {
1375 printk(KERN_CRIT "impossible request in %s.\n", 1376 printk(KERN_CRIT "impossible request in %s.\n",
1376 __FUNCTION__); 1377 __FUNCTION__);
@@ -1381,7 +1382,6 @@ static void scsi_kill_request(struct request *req, request_queue_t *q)
1381 cmd->result = DID_NO_CONNECT << 16; 1382 cmd->result = DID_NO_CONNECT << 16;
1382 atomic_inc(&cmd->device->iorequest_cnt); 1383 atomic_inc(&cmd->device->iorequest_cnt);
1383 __scsi_done(cmd); 1384 __scsi_done(cmd);
1384 spin_lock(q->queue_lock);
1385} 1385}
1386 1386
1387/* 1387/*
@@ -1432,7 +1432,6 @@ static void scsi_request_fn(struct request_queue *q)
1432 if (unlikely(!scsi_device_online(sdev))) { 1432 if (unlikely(!scsi_device_online(sdev))) {
1433 printk(KERN_ERR "scsi%d (%d:%d): rejecting I/O to offline device\n", 1433 printk(KERN_ERR "scsi%d (%d:%d): rejecting I/O to offline device\n",
1434 sdev->host->host_no, sdev->id, sdev->lun); 1434 sdev->host->host_no, sdev->id, sdev->lun);
1435 blkdev_dequeue_request(req);
1436 scsi_kill_request(req, q); 1435 scsi_kill_request(req, q);
1437 continue; 1436 continue;
1438 } 1437 }