iscsi: Use 0 instead of SPDK_SUCCESS in spdk_iscsi_read_pdu to match caller
spdk_iscsi_read_pdu has been used only in a place, iscsi_conn_handle_incoming_pdus. iscsi_conn_handle_incoming_pdus classifies return code of spdk_iscsi_read_pdu to SPDK_ISCSI_CONNECTION_FATAL, 0, or 1. Using 0 instead of SPDK_SUCCESS in spdk_iscsi_read_pdu matches iscsi_conn_handle_incoming_pdus and is done in this patch. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I231c2e70a094c26af2c8eb60d77b92d880674901 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456770 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
0f5314eb05
commit
57fe0394a3
@ -427,7 +427,7 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu)
|
|||||||
pdu->bhs_valid_bytes += rc;
|
pdu->bhs_valid_bytes += rc;
|
||||||
if (pdu->bhs_valid_bytes < ISCSI_BHS_LEN) {
|
if (pdu->bhs_valid_bytes < ISCSI_BHS_LEN) {
|
||||||
*_pdu = NULL;
|
*_pdu = NULL;
|
||||||
return SPDK_SUCCESS;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -447,7 +447,7 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu)
|
|||||||
pdu->ahs_valid_bytes += rc;
|
pdu->ahs_valid_bytes += rc;
|
||||||
if (pdu->ahs_valid_bytes < ahs_len) {
|
if (pdu->ahs_valid_bytes < ahs_len) {
|
||||||
*_pdu = NULL;
|
*_pdu = NULL;
|
||||||
return SPDK_SUCCESS;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,7 +464,7 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu)
|
|||||||
pdu->hdigest_valid_bytes += rc;
|
pdu->hdigest_valid_bytes += rc;
|
||||||
if (pdu->hdigest_valid_bytes < ISCSI_DIGEST_LEN) {
|
if (pdu->hdigest_valid_bytes < ISCSI_DIGEST_LEN) {
|
||||||
*_pdu = NULL;
|
*_pdu = NULL;
|
||||||
return SPDK_SUCCESS;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -485,7 +485,7 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu)
|
|||||||
pdu->mobj = spdk_mempool_get(pool);
|
pdu->mobj = spdk_mempool_get(pool);
|
||||||
if (pdu->mobj == NULL) {
|
if (pdu->mobj == NULL) {
|
||||||
*_pdu = NULL;
|
*_pdu = NULL;
|
||||||
return SPDK_SUCCESS;
|
return 0;
|
||||||
}
|
}
|
||||||
pdu->data_buf = pdu->mobj->buf;
|
pdu->data_buf = pdu->mobj->buf;
|
||||||
}
|
}
|
||||||
@ -498,7 +498,7 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu)
|
|||||||
pdu->data_valid_bytes += rc;
|
pdu->data_valid_bytes += rc;
|
||||||
if (pdu->data_valid_bytes < data_len) {
|
if (pdu->data_valid_bytes < data_len) {
|
||||||
*_pdu = NULL;
|
*_pdu = NULL;
|
||||||
return SPDK_SUCCESS;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -515,7 +515,7 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu)
|
|||||||
pdu->ddigest_valid_bytes += rc;
|
pdu->ddigest_valid_bytes += rc;
|
||||||
if (pdu->ddigest_valid_bytes < ISCSI_DIGEST_LEN) {
|
if (pdu->ddigest_valid_bytes < ISCSI_DIGEST_LEN) {
|
||||||
*_pdu = NULL;
|
*_pdu = NULL;
|
||||||
return SPDK_SUCCESS;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -537,7 +537,7 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu)
|
|||||||
*/
|
*/
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
spdk_put_pdu(pdu);
|
spdk_put_pdu(pdu);
|
||||||
return SPDK_SUCCESS;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user