summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cache.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2007-05-25 22:19:49 +0000
committerpjd <pjd@FreeBSD.org>2007-05-25 22:19:49 +0000
commit29aee808dff1626ff8e4f4cf47d359c598b53403 (patch)
tree90c38567e10d449cf4be6cd37dd63a96cfa76e78 /sys/kern/vfs_cache.c
parent0d899d01c1fd92303dcc6f2a0faffd0c7e864d2a (diff)
downloadFreeBSD-src-29aee808dff1626ff8e4f4cf47d359c598b53403.zip
FreeBSD-src-29aee808dff1626ff8e4f4cf47d359c598b53403.tar.gz
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.
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r--sys/kern/vfs_cache.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 9b96b94..088425e 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -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();
}
OpenPOWER on IntegriCloud