lib/iscsi: Embed _iscsi_conn_free() into the caller and free it
_iscsi_conn_free() is simple enough to embed it into the caller and remove it. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I22bcbbdab15eca647914715754c04b8ec14ad9b2 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472901 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
9a25fc12bb
commit
71f63bb7d9
@ -368,18 +368,6 @@ iscsi_conn_free_tasks(struct spdk_iscsi_conn *conn)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
_iscsi_conn_free(struct spdk_iscsi_conn *conn)
|
||||
{
|
||||
if (conn == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
spdk_iscsi_param_free(conn->params);
|
||||
|
||||
free_conn(conn);
|
||||
}
|
||||
|
||||
static void
|
||||
iscsi_conn_cleanup_backend(struct spdk_iscsi_conn *conn)
|
||||
{
|
||||
@ -446,7 +434,8 @@ iscsi_conn_free(struct spdk_iscsi_conn *conn)
|
||||
|
||||
end:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "cleanup free conn\n");
|
||||
_iscsi_conn_free(conn);
|
||||
spdk_iscsi_param_free(conn->params);
|
||||
free_conn(conn);
|
||||
|
||||
pthread_mutex_unlock(&g_conns_mutex);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user