Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25825
b: refs/heads/master
c: e36e0c8
h: refs/heads/master
i:
  25823: 58be248
v: v3
  • Loading branch information
Tejun Heo authored and James Bottomley committed Apr 13, 2006
1 parent 42ce84b commit 690ff8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aedf349773e5877d716a89368d512b9baa3e8c7b
refs/heads/master: e36e0c80137af8f012528938dab2970c26d5ec4c
15 changes: 15 additions & 0 deletions trunk/drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,8 @@ static inline int scsi_host_queue_ready(struct request_queue *q,
static void scsi_kill_request(struct request *req, request_queue_t *q)
{
struct scsi_cmnd *cmd = req->special;
struct scsi_device *sdev = cmd->device;
struct Scsi_Host *shost = sdev->host;

blkdev_dequeue_request(req);

Expand All @@ -1491,6 +1493,19 @@ static void scsi_kill_request(struct request *req, request_queue_t *q)
scsi_init_cmd_errh(cmd);
cmd->result = DID_NO_CONNECT << 16;
atomic_inc(&cmd->device->iorequest_cnt);

/*
* SCSI request completion path will do scsi_device_unbusy(),
* bump busy counts. To bump the counters, we need to dance
* with the locks as normal issue path does.
*/
sdev->device_busy++;
spin_unlock(sdev->request_queue->queue_lock);
spin_lock(shost->host_lock);
shost->host_busy++;
spin_unlock(shost->host_lock);
spin_lock(sdev->request_queue->queue_lock);

__scsi_done(cmd);
}

Expand Down

0 comments on commit 690ff8e

Please sign in to comment.