Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226853
b: refs/heads/master
c: db42231
h: refs/heads/master
i:
  226851: 274054e
v: v3
  • Loading branch information
Menny Hamburger authored and James Bottomley committed Dec 21, 2010
1 parent df2dd86 commit 1ebb18e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35dd3039e09cd46ca3a8733ff1c817bf7b7b19ce
refs/heads/master: db422318cbca55168cf965f655471dbf8be82433
11 changes: 9 additions & 2 deletions trunk/drivers/scsi/device_handler/scsi_dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,19 @@ int scsi_dh_activate(struct request_queue *q, activate_complete fn, void *data)
sdev = q->queuedata;
if (sdev && sdev->scsi_dh_data)
scsi_dh = sdev->scsi_dh_data->scsi_dh;
if (!scsi_dh || !get_device(&sdev->sdev_gendev))
if (!scsi_dh || !get_device(&sdev->sdev_gendev) ||
sdev->sdev_state == SDEV_CANCEL ||
sdev->sdev_state == SDEV_DEL)
err = SCSI_DH_NOSYS;
if (sdev->sdev_state == SDEV_OFFLINE)
err = SCSI_DH_DEV_OFFLINED;
spin_unlock_irqrestore(q->queue_lock, flags);

if (err)
if (err) {
if (fn)
fn(data, err);
return err;
}

if (scsi_dh->activate)
err = scsi_dh->activate(sdev, fn, data);
Expand Down

0 comments on commit 1ebb18e

Please sign in to comment.