From: Andy Adamson Date: Fri, 3 Apr 2009 05:28:25 +0000 (+0300) Subject: nfsd41: clear DRC cache on free_session X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=14778a133e3be332be77d981552a79260a61ee17;p=linux-2.6-omap-h63xx.git nfsd41: clear DRC cache on free_session Signed-off-by: Andy Adamson Signed-off-by: Benny Halevy Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index e20d4345040..f25a7d2a9fa 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -441,12 +441,19 @@ release_session(struct nfsd4_session *ses) nfsd4_put_session(ses); } +static void nfsd4_release_respages(struct page **respages, short resused); + void free_session(struct kref *kref) { struct nfsd4_session *ses; + int i; ses = container_of(kref, struct nfsd4_session, se_ref); + for (i = 0; i < ses->se_fnumslots; i++) { + struct nfsd4_cache_entry *e = &ses->se_slots[i].sl_cache_entry; + nfsd4_release_respages(e->ce_respages, e->ce_resused); + } kfree(ses->se_slots); kfree(ses); }