From: Andy Adamson <andros@xxxxxxxxxx> Signed-off-by: Andy Adamson<andros@xxxxxxxxxx> Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx> --- fs/nfsd/nfs4state.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index a1a9e0a..cefb605 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -478,8 +478,15 @@ void free_session(struct kref *kref) { struct nfs41_session *ses; + int i; ses = container_of(kref, struct nfs41_session, se_ref); + for (i = 0; i < ses->se_fnumslots; i++) { + struct nfs41_cache_entry *e = &ses->se_slots[i].sl_cache_entry; + spin_lock(&e->ce_lock); + nfsd4_clear_respages(e->ce_respages, e->ce_resused); + spin_unlock(&e->ce_lock); + } kfree(ses->se_slots); kfree(ses); } -- 1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html