summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-02-23 14:09:24 -0800
committerJason Gunthorpe <jgg@mellanox.com>2018-02-28 13:57:39 -0700
commite68088e78d82920632eba112b968e49d588d02a2 (patch)
treebbcb71407b8cd197089d95cf3933990a4e327f94 /drivers/infiniband/ulp
parenta8ed748708ba9c9976fb0d7b4844f4c2fa5ecb34 (diff)
downloadop-kernel-dev-e68088e78d82920632eba112b968e49d588d02a2.zip
op-kernel-dev-e68088e78d82920632eba112b968e49d588d02a2.tar.gz
IB/srp: Fix srp_abort()
Before commit e494f6a72839 ("[SCSI] improved eh timeout handler") it did not really matter whether or not abort handlers like srp_abort() called .scsi_done() when returning another value than SUCCESS. Since that commit however this matters. Hence only call .scsi_done() when returning SUCCESS. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: stable@vger.kernel.org Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 241c0e7..4a1a489 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -2974,9 +2974,11 @@ static int srp_abort(struct scsi_cmnd *scmnd)
ret = FAST_IO_FAIL;
else
ret = FAILED;
- srp_free_req(ch, req, scmnd, 0);
- scmnd->result = DID_ABORT << 16;
- scmnd->scsi_done(scmnd);
+ if (ret == SUCCESS) {
+ srp_free_req(ch, req, scmnd, 0);
+ scmnd->result = DID_ABORT << 16;
+ scmnd->scsi_done(scmnd);
+ }
return ret;
}
OpenPOWER on IntegriCloud