Skip to content

Commit 7ae0451

Browse files
alexaringteigland
authored andcommitted
fs: dlm: use free_con to free connection
This patch use free_con() functionality to free the listen connection if listen fails. It also fixes an issue that a freed resource is still part of the connection_hash as hlist_del() is not called in this case. The only difference is that free_con() handles othercon as well, but this is never been set for the listen connection. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
1 parent 948c47e commit 7ae0451

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎fs/dlm/lowcomms.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,10 +1704,8 @@ int dlm_lowcomms_start(void)
17041704
fail_unlisten:
17051705
dlm_allow_conn = 0;
17061706
con = nodeid2con(0,0);
1707-
if (con) {
1708-
close_connection(con, false, true, true);
1709-
kfree_rcu(con, rcu);
1710-
}
1707+
if (con)
1708+
free_conn(con);
17111709
fail:
17121710
return error;
17131711
}

0 commit comments

Comments
 (0)