Index: afs_vcache.c =================================================================== RCS file: /cvs/openafs/src/afs/afs_vcache.c,v retrieving revision 1.65.2.50 diff -u -d -r1.65.2.50 afs_vcache.c --- afs_vcache.c 26 Aug 2008 14:02:11 -0000 1.65.2.50 +++ afs_vcache.c 6 Mar 2009 20:13:48 -0000 @@ -313,6 +313,8 @@ * held, so we don't have to worry about blocking in osi_Alloc. */ static struct afs_cbr *afs_cbrSpace = 0; +/* if alloc limit below changes, fix me! */ +static struct afs_cbr *afs_cbrHeads[2]; struct afs_cbr * afs_AllocCBR(void) { @@ -334,6 +336,7 @@ } tsp[AFS_NCBRS - 1].next = 0; afs_cbrSpace = tsp; + afs_cbrHeads[afs_stats_cmperf.CallBackAlloced] = tsp; afs_stats_cmperf.CallBackAlloced++; } } @@ -3085,8 +3088,9 @@ /* * Free any leftover callback queue */ - for (tsp = afs_cbrSpace; tsp; tsp = nsp) { - nsp = tsp->next; + for (i = 0; i < afs_stats_cmperf.CallBackAlloced; i++) { + tsp = afs_cbrHeads[i]; + afs_cbrHeads[i] = 0; afs_osi_Free((char *)tsp, AFS_NCBRS * sizeof(struct afs_cbr)); } afs_cbrSpace = 0;