1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

We no longer need to put namecache entries onto temporary mplist.

It was useful in revision 1.86, but should have been removed in 1.89.
This commit is contained in:
Pawel Jakub Dawidek 2007-05-25 22:19:49 +00:00
parent 950afe9972
commit b4c85af977
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169999

View File

@ -580,23 +580,15 @@ cache_purgevfs(mp)
{
struct nchashhead *ncpp;
struct namecache *ncp, *nnp;
struct nchashhead mplist;
LIST_INIT(&mplist);
/* Scan hash tables for applicable entries */
CACHE_LOCK();
for (ncpp = &nchashtbl[nchash]; ncpp >= nchashtbl; ncpp--) {
for (ncp = LIST_FIRST(ncpp); ncp != NULL; ncp = nnp) {
nnp = LIST_NEXT(ncp, nc_hash);
if (ncp->nc_dvp->v_mount == mp) {
LIST_REMOVE(ncp, nc_hash);
LIST_INSERT_HEAD(&mplist, ncp, nc_hash);
}
LIST_FOREACH_SAFE(ncp, ncpp, nc_hash, nnp) {
if (ncp->nc_dvp->v_mount == mp)
cache_zap(ncp);
}
}
while (!LIST_EMPTY(&mplist))
cache_zap(LIST_FIRST(&mplist));
CACHE_UNLOCK();
}