Commit 14778a13 authored by Andy Adamson's avatar Andy Adamson Committed by J. Bruce Fields

nfsd41: clear DRC cache on free_session

Signed-off-by: Andy Adamson<andros@netapp.com>
Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent da3846a2
...@@ -441,12 +441,19 @@ release_session(struct nfsd4_session *ses) ...@@ -441,12 +441,19 @@ release_session(struct nfsd4_session *ses)
nfsd4_put_session(ses); nfsd4_put_session(ses);
} }
static void nfsd4_release_respages(struct page **respages, short resused);
void void
free_session(struct kref *kref) free_session(struct kref *kref)
{ {
struct nfsd4_session *ses; struct nfsd4_session *ses;
int i;
ses = container_of(kref, struct nfsd4_session, se_ref); 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->se_slots);
kfree(ses); kfree(ses);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment