Skip to content

Commit

Permalink
[DLM] Clear othercon pointers when a connection is closed
Browse files Browse the repository at this point in the history
This patch clears the othercon pointer and frees the memory when a connnection
is closed. This could cause a small memory leak when nodes leave the cluster.

Signed-Off-By: Patrick Caulfield <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
  • Loading branch information
Patrick Caulfield authored and swhiteho committed Aug 14, 2007
1 parent 39d3520 commit 25720c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ static void close_connection(struct connection *con, bool and_other)
if (con->othercon && and_other) {
/* Will only re-enter once. */
close_connection(con->othercon, false);
kmem_cache_free(con_cache, con->othercon);
con->othercon = NULL;
}
if (con->rx_page) {
__free_page(con->rx_page);
Expand Down

0 comments on commit 25720c2

Please sign in to comment.