diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-06 18:47:07 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-06 18:47:07 -0800 |
commit | d11d9b2dd2c43dd99a491df8a83ae28401db0044 (patch) | |
tree | 553c220602ee9769b01e2c0343b463c185d097b6 | |
parent | 15730ddbf745fbda9001b8bbd71977ac66bf5f41 (diff) | |
parent | 1285b3a0b0aa2391ac6f6939e6737203c8220f68 (diff) | |
download | linux-3.10-d11d9b2dd2c43dd99a491df8a83ae28401db0044.tar.gz linux-3.10-d11d9b2dd2c43dd99a491df8a83ae28401db0044.tar.bz2 linux-3.10-d11d9b2dd2c43dd99a491df8a83ae28401db0044.zip |
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
IB/srp: Don't send task management commands after target removal
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 2d2d4ac3525..960dae5c87d 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1155,6 +1155,12 @@ static int srp_send_tsk_mgmt(struct scsi_cmnd *scmnd, u8 func) spin_lock_irq(target->scsi_host->host_lock); + if (target->state == SRP_TARGET_DEAD || + target->state == SRP_TARGET_REMOVED) { + scmnd->result = DID_BAD_TARGET << 16; + goto out; + } + if (scmnd->host_scribble == (void *) -1L) goto out; |