From: Bart Van Assche Date: Wed, 10 Jul 2013 15:36:35 +0000 (+0200) Subject: IB/srp: Let srp_abort() return FAST_IO_FAIL if TL offline X-Git-Tag: v5.15~19707^2^4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80d5e8a235624cd3c0e24be7c070fd6f445e590d;p=platform%2Fkernel%2Flinux-starfive.git IB/srp: Let srp_abort() return FAST_IO_FAIL if TL offline If the transport layer is offline it is more appropriate to let srp_abort() return FAST_IO_FAIL instead of SUCCESS. Reported-by: Sebastian Riemer Acked-by: David Dillow Signed-off-by: Bart Van Assche Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 9d8b46eafdb2..f93baf8254c4 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1753,8 +1753,7 @@ static int srp_abort(struct scsi_cmnd *scmnd) if (!req || !srp_claim_req(target, req, scmnd)) return FAILED; if (srp_send_tsk_mgmt(target, req->index, scmnd->device->lun, - SRP_TSK_ABORT_TASK) == 0 || - target->transport_offline) + SRP_TSK_ABORT_TASK) == 0) ret = SUCCESS; else if (target->transport_offline) ret = FAST_IO_FAIL;