isert-scst: fix isert connection teardown flow

Synchronizing the rdma_disconnect() with the post drain wr
as other ULPs like iSER do.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7181 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Israel Rukshin
2017-05-14 13:45:02 +00:00
parent 8315bfdd0f
commit 28c5d73550

View File

@@ -198,8 +198,11 @@ static void isert_post_drain_rq(struct isert_connection *isert_conn)
void isert_post_drain(struct isert_connection *isert_conn)
{
if (!test_and_set_bit(ISERT_DRAIN_POSTED, &isert_conn->flags)) {
mutex_lock(&isert_conn->state_mutex);
isert_conn->state = ISER_CONN_CLOSING;
isert_post_drain_rq(isert_conn);
isert_post_drain_sq(isert_conn);
mutex_unlock(&isert_conn->state_mutex);
}
}