From cd0e8408049c3dbff1ab96cb01467d71d90a0036 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Wed, 21 Oct 2026 15:03:03 +0300 Subject: [PATCH] isert-scst: Remove empty completion and abort helpers Manual source review found that isert_task_abort() and isert_data_in_sent() only return zero, and every caller discards that result. Remove the helpers, declarations and calls, including the completion branch used solely to reach the empty helper. Keep PDU completion and DMA unmapping in their existing order. --- iscsi-scst/kernel/isert-scst/iser_datamover.c | 5 ----- iscsi-scst/kernel/isert-scst/iser_datamover.h | 2 -- iscsi-scst/kernel/isert-scst/iser_rdma.c | 11 ----------- iscsi-scst/kernel/isert-scst/isert.c | 5 ----- iscsi-scst/kernel/isert-scst/isert_login.c | 1 - 5 files changed, 24 deletions(-) diff --git a/iscsi-scst/kernel/isert-scst/iser_datamover.c b/iscsi-scst/kernel/isert-scst/iser_datamover.c index 1441a49fc..3be53334b 100644 --- a/iscsi-scst/kernel/isert-scst/iser_datamover.c +++ b/iscsi-scst/kernel/isert-scst/iser_datamover.c @@ -284,11 +284,6 @@ int isert_close_connection(struct iscsi_conn *iscsi_conn) return 0; } -int isert_task_abort(struct iscsi_cmnd *cmnd) -{ - return 0; -} - void *isert_get_priv(struct iscsi_conn *iscsi_conn) { struct isert_conn *isert_conn = container_of(iscsi_conn, diff --git a/iscsi-scst/kernel/isert-scst/iser_datamover.h b/iscsi-scst/kernel/isert-scst/iser_datamover.h index ec1c8a378..0238504c8 100644 --- a/iscsi-scst/kernel/isert-scst/iser_datamover.h +++ b/iscsi-scst/kernel/isert-scst/iser_datamover.h @@ -70,7 +70,6 @@ int isert_send_data_in(struct iscsi_cmnd *cmd, struct iscsi_cmnd *rsp); int isert_send_status(struct iscsi_cmnd *rsp); int isert_close_connection(struct iscsi_conn *iscsi_conn); -int isert_task_abort(struct iscsi_cmnd *cmnd); void isert_free_connection(struct iscsi_conn *iscsi_conn); void isert_release_tx_pdu(struct iscsi_cmnd *iscsi_pdu); @@ -82,7 +81,6 @@ int isert_conn_established(struct iscsi_conn *iscsi_conn, int isert_login_req_rx(struct iscsi_cmnd *login_req); int isert_pdu_rx(struct iscsi_cmnd *pdu); int isert_data_out_ready(struct iscsi_cmnd *cmd); -int isert_data_in_sent(struct iscsi_cmnd *cmd); int isert_pdu_sent(struct iscsi_cmnd *pdu); void isert_pdu_err(struct iscsi_cmnd *pdu); diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index e2d8180b6..0c3686c7a 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -426,18 +426,9 @@ static void isert_send_completion_handler(struct isert_wr *wr) { struct isert_cmnd *isert_pdu = wr->pdu; struct iscsi_cmnd *iscsi_pdu = &isert_pdu->iscsi; - struct iscsi_cmnd *iscsi_req_pdu = iscsi_pdu->parent_req; TRACE_ENTRY(); - if (iscsi_req_pdu && iscsi_req_pdu->bufflen) { - struct isert_cmnd *isert_req_pdu = - container_of(iscsi_req_pdu, struct isert_cmnd, iscsi); - - if (isert_req_pdu->is_rstag_valid) - isert_data_in_sent(iscsi_req_pdu); - } - isert_pdu_sent(iscsi_pdu); TRACE_EXIT(); @@ -465,8 +456,6 @@ static void isert_rdma_wr_completion_handler(struct isert_wr *wr) ib_dma_unmap_sg(ib_dev, isert_buf->sg, isert_buf->sg_cnt, isert_buf->dma_dir); isert_buf->sg_cnt = 0; - - isert_data_in_sent(&wr->pdu->iscsi); } SCST_KUNIT_VISIBLE diff --git a/iscsi-scst/kernel/isert-scst/isert.c b/iscsi-scst/kernel/isert-scst/isert.c index 8666507f3..5e93d8e84 100644 --- a/iscsi-scst/kernel/isert-scst/isert.c +++ b/iscsi-scst/kernel/isert-scst/isert.c @@ -359,11 +359,6 @@ int isert_data_out_ready(struct iscsi_cmnd *cmnd) return res; } -int isert_data_in_sent(struct iscsi_cmnd *din) -{ - return 0; -} - void isert_pdu_err(struct iscsi_cmnd *pdu) { struct iscsi_conn *conn = pdu->conn; diff --git a/iscsi-scst/kernel/isert-scst/isert_login.c b/iscsi-scst/kernel/isert-scst/isert_login.c index 36c6160f2..248b8bd80 100644 --- a/iscsi-scst/kernel/isert-scst/isert_login.c +++ b/iscsi-scst/kernel/isert-scst/isert_login.c @@ -438,7 +438,6 @@ static void isert_dev_disconnect(struct iscsi_conn *iscsi_conn) dev->state = CS_DISCONNECTED; dev->conn = NULL; if (dev->login_req) { - isert_task_abort(dev->login_req); spin_lock(&dev->pdu_lock); dev->login_req = NULL; spin_unlock(&dev->pdu_lock);