pseudofs: fix off by one in hash iteration in pfs_purge

Sponsored by:	Dell Technologies
Differential Revision:	https://reviews.freebsd.org/D42628
This commit is contained in:
Alvin Chen 2023-11-20 05:55:35 +00:00 committed by Mateusz Guzik
parent 1b681154f5
commit e0d0f0930e

View File

@ -306,7 +306,7 @@ pfs_purge(struct pfs_node *pn)
mtx_lock(&pfs_vncache_mutex);
restart:
removed = 0;
for (i = 0; i < pfs_vncache_hash; i++) {
for (i = 0; i <= pfs_vncache_hash; i++) {
restart_chain:
SLIST_FOREACH(pvd, &pfs_vncache_hashtbl[i], pvd_hash) {
if (pn != NULL && pvd->pvd_pn != pn)