From bc6dd95016c63d0742698d902aebf73c01162c24 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Fri, 16 Nov 2012 14:18:32 -0600 Subject: [PATCH] afs: Fix VLRU traversal sanity check On non-Linux, the number of vcaches in the VLRU can easily exceed afs_maxvcount, since we allocate new vcaches when we run out. So, assume we only have afs_vcount vcaches on the VLRU, instead of assuming we have at most afs_maxvcount vcaches. Change-Id: I3bec8f795b1f6e086ddb490400616c5b42d8b8be Reviewed-on: http://gerrit.openafs.org/8471 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/afs/afs_vcache.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 8af3cdec2..4acfd345e 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -716,9 +716,8 @@ afs_ShakeLooseVCaches(afs_int32 anumber) uq = QPrev(tq); if (tvc->f.states & CVFlushed) { refpanic("CVFlushed on VLRU"); - /* In the other path, this was 2 * afs_cacheStats */ - } else if (!afsd_dynamic_vcaches && i++ > afs_maxvcount) { - refpanic("Exceeded pool of AFS vnodes(VLRU cycle?)"); + } else if (!afsd_dynamic_vcaches && i++ > afs_vcount) { + refpanic("Found too many AFS vnodes on VLRU (VLRU cycle?)"); } else if (QNext(uq) != tq) { refpanic("VLRU inconsistent"); } else if (tvc->f.states & CVInit) { -- 2.39.5