summaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorPatrick Caulfield <pcaulfie@redhat.com>2007-07-11 14:39:43 +0200
committerSteven Whitehouse <swhiteho@redhat.com>2007-08-14 11:28:05 +0200
commit25720c2d73058f4f929f16093f60817ed52a285c (patch)
tree09b14797656f31596c3b061608eeba7b8ded3701 /fs/dlm
parentLinux 2.6.23-rc3 (diff)
downloadlinux-25720c2d73058f4f929f16093f60817ed52a285c.tar.xz
linux-25720c2d73058f4f929f16093f60817ed52a285c.zip
[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 <pcaulfie@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/dlm/lowcomms.c2
1 files changed, 2 insertions, 0 deletions
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);