nfsd41: reclaim DRC memory on session free
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>
This commit is contained in:
parent
413d63d710
commit
be98d1bbd1
|
@ -585,6 +585,9 @@ free_session(struct kref *kref)
|
||||||
struct nfsd4_cache_entry *e = &ses->se_slots[i].sl_cache_entry;
|
struct nfsd4_cache_entry *e = &ses->se_slots[i].sl_cache_entry;
|
||||||
nfsd4_release_respages(e->ce_respages, e->ce_resused);
|
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);
|
kfree(ses);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue