mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-20 14:16:02 +00:00
IB/iser: Release the iscsi endpoint if ep_disconnect wasn't called
In some cases, we might reach the iser connection termination without ep_disconnect being invoked (for example if user-space daemon doesn't exists. In this case, we need to free the iscsi endpoint when we remove the iser connection. Signed-off-by: Ariel Nahum <arieln@mellanox.com> Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
6606e6a2ff
commit
9a3119e4b7
1 changed files with 2 additions and 0 deletions
|
@ -646,9 +646,11 @@ void iser_conn_release(struct iser_conn *iser_conn)
|
|||
mutex_unlock(&ig.connlist_mutex);
|
||||
|
||||
mutex_lock(&iser_conn->state_mutex);
|
||||
/* In case we endup here without ep_disconnect being invoked. */
|
||||
if (iser_conn->state != ISER_CONN_DOWN) {
|
||||
iser_warn("iser conn %p state %d, expected state down.\n",
|
||||
iser_conn, iser_conn->state);
|
||||
iscsi_destroy_endpoint(iser_conn->ep);
|
||||
iser_conn->state = ISER_CONN_DOWN;
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue