aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-07-27 18:49:05 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-07-28 14:29:48 -0400
commitbe98d1bbd1b872a10d64cdef0af10b9afcc48092 (patch)
tree10685e758e2539cf1e579114643b78c143ccee89
parent413d63d7106b914a4a004ac08698f10c618e4616 (diff)
nfsd41: reclaim DRC memory on session free
This fixes a leak which would eventually lock out new clients. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
-rw-r--r--fs/nfsd/nfs4state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 2e6a44e3d2fe..69bd37e3fdcf 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -585,6 +585,9 @@ free_session(struct kref *kref)
585 struct nfsd4_cache_entry *e = &ses->se_slots[i].sl_cache_entry; 585 struct nfsd4_cache_entry *e = &ses->se_slots[i].sl_cache_entry;
586 nfsd4_release_respages(e->ce_respages, e->ce_resused); 586 nfsd4_release_respages(e->ce_respages, e->ce_resused);
587 } 587 }
588 spin_lock(&nfsd_drc_lock);
589 nfsd_drc_pages_used -= ses->se_fchannel.maxreqs * NFSD_PAGES_PER_SLOT;
590 spin_unlock(&nfsd_drc_lock);
588 kfree(ses); 591 kfree(ses);
589} 592}
590 593