[lkml]   [2007]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] [DLM] Clear othercon pointers when a connection is closed
From: Patrick Caulfield <>

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 dd36273..d15fd5f 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) {
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-08-14 12:13    [W:0.094 / U:7.000 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site