]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: RDMA/srpt: Fix handling of TMF submission failure
authorBart Van Assche <bvanassche@acm.org>
Fri, 25 Jan 2019 18:34:49 +0000 (10:34 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 5 Feb 2019 02:30:37 +0000 (21:30 -0500)
If submitting a TMF to the target core fails, send the "FUNCTION REJECTED"
response to the initiator.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Cc: Doug Ledford <dledford@redhat.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/infiniband/ulp/srpt/ib_srpt.c

index 4fc901d1c0c1fafa316cca8e7e6e17b20e7e74b5..0dc2df925f76fce9bf3ae5c5ea9e522b68ea39c2 100644 (file)
@@ -1581,11 +1581,9 @@ static void srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch,
                               TARGET_SCF_ACK_KREF);
        if (rc != 0) {
                send_ioctx->cmd.se_tmr_req->response = TMR_FUNCTION_REJECTED;
-               goto fail;
+               cmd->se_tfo->queue_tm_rsp(cmd);
        }
        return;
-fail:
-       transport_send_check_condition_and_sense(cmd, 0, 0); // XXX:
 }
 
 /**