From: Patrick Caulfield Date: Wed, 11 Jul 2007 12:39:43 +0000 (+0100) Subject: [DLM] Clear othercon pointers when a connection is closed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=25720c2d73058f4f929f16093f60817ed52a285c;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [DLM] Clear othercon pointers when a connection is closed 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 Signed-off-by: Steven Whitehouse --- diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index dd362739d291..d15fd5f9f5c5 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -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);