Small cleanup of unused code
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Mon, 10 Nov 2008 17:23:23 +0000 (17:23 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Mon, 10 Nov 2008 17:23:23 +0000 (17:23 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@566 d57e44dd-8a1f-0410-8b47-8ef2f437770f

srpt/src/ib_srpt.c

index a88f897..550aabd 100644 (file)
@@ -662,19 +662,11 @@ static void srpt_handle_err_comp(struct srpt_rdma_ch *ch, struct ib_wc *wc)
                                             scst_cmd_get_sg_cnt(scmnd),
                                             scst_to_tgt_dma_dir(dir));
 
-                               if (scmnd->data_buf_tgt_alloc &&
-                                   scmnd->data_buf_alloced) {
-                                       kfree(scmnd->sg);
-                                       scmnd->sg = NULL;
-                                       scmnd->sg_cnt = 0;
-                               }
-
                                if (scmnd->state == SCST_CMD_STATE_DATA_WAIT)
                                        scst_rx_data(scmnd,
                                                     SCST_RX_STATUS_ERROR,
                                                     SCST_CONTEXT_THREAD);
-                               else if (scmnd->state ==
-                                               SCST_CMD_STATE_XMIT_WAIT)
+                               else if (scmnd->state == SCST_CMD_STATE_XMIT_WAIT)
                                        scst_tgt_cmd_done(scmnd,
                                                scst_estimate_context());
                        }
@@ -697,13 +689,6 @@ static void srpt_handle_send_comp(struct srpt_rdma_ch *ch,
                                     scst_cmd_get_sg_cnt(ioctx->scmnd),
                                     scst_to_tgt_dma_dir(dir));
 
-               if (ioctx->scmnd->data_buf_tgt_alloc &&
-                   ioctx->scmnd->data_buf_alloced) {
-                       kfree(ioctx->scmnd->sg);
-                       ioctx->scmnd->sg = NULL;
-                       ioctx->scmnd->sg_cnt = 0;
-               }
-
                scst_tgt_cmd_done(ioctx->scmnd, context);
        } else
                srpt_reset_ioctx(ch, ioctx);