Skip to content

Commit e68088e

Browse files
KAGA-KOKOjgunthorpe
authored andcommitted
IB/srp: Fix srp_abort()
Before commit e494f6a ("[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>
1 parent a8ed748 commit e68088e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎drivers/infiniband/ulp/srp/ib_srp.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2974,9 +2974,11 @@ static int srp_abort(struct scsi_cmnd *scmnd)
29742974
ret = FAST_IO_FAIL;
29752975
else
29762976
ret = FAILED;
2977-
srp_free_req(ch, req, scmnd, 0);
2978-
scmnd->result = DID_ABORT << 16;
2979-
scmnd->scsi_done(scmnd);
2977+
if (ret == SUCCESS) {
2978+
srp_free_req(ch, req, scmnd, 0);
2979+
scmnd->result = DID_ABORT << 16;
2980+
scmnd->scsi_done(scmnd);
2981+
}
29802982

29812983
return ret;
29822984
}

0 commit comments

Comments
 (0)