Skip to content

Commit

Permalink
nfsd41: reclaim DRC memory on session free
Browse files Browse the repository at this point in the history
This fixes a leak which would eventually lock out new clients.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
Andy Adamson authored and J. Bruce Fields committed Jul 28, 2009
1 parent 413d63d commit be98d1b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ free_session(struct kref *kref)
struct nfsd4_cache_entry *e = &ses->se_slots[i].sl_cache_entry;
nfsd4_release_respages(e->ce_respages, e->ce_resused);
}
spin_lock(&nfsd_drc_lock);
nfsd_drc_pages_used -= ses->se_fchannel.maxreqs * NFSD_PAGES_PER_SLOT;
spin_unlock(&nfsd_drc_lock);
kfree(ses);
}

Expand Down

0 comments on commit be98d1b

Please sign in to comment.