[3.5.y.z,extended,stable] Patch "nfsd: Fix memleak" has been added to staging queue

Message ID 1362430127-21863-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques March 4, 2013, 8:48 p.m.
This is a note to let you know that I have just added a patch titled

    nfsd: Fix memleak

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 2548f809cc9a0022875e2f1be009d217a7dd523c Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@gmail.com>
Date: Tue, 29 Jan 2013 13:16:06 +0800
Subject: [PATCH] nfsd: Fix memleak

commit 2d32b29a1c2830f7c42caa8258c714acd983961f upstream.

When free nfs-client, it must free the ->cl_stateids.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
 fs/nfsd/nfs4state.c | 2 ++
 1 file changed, 2 insertions(+)



diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 6ca92b1..c4daf96 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1090,6 +1090,8 @@  free_client(struct nfs4_client *clp)
+	idr_remove_all(&clp->cl_stateids);
+	idr_destroy(&clp->cl_stateids);