Skip to content

Commit

Permalink
nfsd41: clear DRC cache on free_session
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Adamson authored and J. Bruce Fields committed Apr 4, 2009
1 parent da3846a commit 14778a1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 14778a1

Please sign in to comment.