aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-04-03 01:28:25 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-04-03 20:41:18 -0400
commit14778a133e3be332be77d981552a79260a61ee17 (patch)
treef0b67f5e40481f43c74091809892aeddb4b8c043 /fs/nfsd/nfs4state.c
parentda3846a2866ddf239311766ff434a82e7b4ac701 (diff)
nfsd41: clear DRC cache on free_session
Signed-off-by: Andy Adamson<andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index e20d4345040f..f25a7d2a9fac 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -441,12 +441,19 @@ release_session(struct nfsd4_session *ses)
441 nfsd4_put_session(ses); 441 nfsd4_put_session(ses);
442} 442}
443 443
444static void nfsd4_release_respages(struct page **respages, short resused);
445
444void 446void
445free_session(struct kref *kref) 447free_session(struct kref *kref)
446{ 448{
447 struct nfsd4_session *ses; 449 struct nfsd4_session *ses;
450 int i;
448 451
449 ses = container_of(kref, struct nfsd4_session, se_ref); 452 ses = container_of(kref, struct nfsd4_session, se_ref);
453 for (i = 0; i < ses->se_fnumslots; i++) {
454 struct nfsd4_cache_entry *e = &ses->se_slots[i].sl_cache_entry;
455 nfsd4_release_respages(e->ce_respages, e->ce_resused);
456 }
450 kfree(ses->se_slots); 457 kfree(ses->se_slots);
451 kfree(ses); 458 kfree(ses);
452} 459}