IB/srp: Let srp_abort() return FAST_IO_FAIL if TL offline
authorBart Van Assche <bvanassche@acm.org>
Wed, 10 Jul 2013 15:36:35 +0000 (17:36 +0200)
committerRoland Dreier <roland@purestorage.com>
Thu, 11 Jul 2013 23:43:48 +0000 (16:43 -0700)
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 <sebastian.riemer@profitbricks.com>
Acked-by: David Dillow <dillowda@ornl.gov>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/srp/ib_srp.c

index 9d8b46eafdb2d02a8d49ede1fe083d0a82f7b850..f93baf8254c4d492065155b4b701529629260b30 100644 (file)
@@ -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;