From c136c332508705b013def8bdf45ee1176b2c39ed Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Wed, 20 Nov 2002 03:05:17 +0000 Subject: [PATCH] STABLE12-dynamic-root-allocate-space-for-dot-and-dotdot-20011102 reserve space for . and .. in dynroot/freelance fix my (shadow@dementia.org) screwup --- src/afs/afs_dynroot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/afs/afs_dynroot.c b/src/afs/afs_dynroot.c index e42714b2c..b90d968bc 100644 --- a/src/afs/afs_dynroot.c +++ b/src/afs/afs_dynroot.c @@ -229,6 +229,9 @@ afs_RefreshDynroot() curChunk = 13; curPage = 0; + /* Reserve space for "." and ".." */ + curChunk += 2; + for (cellidx = 0; cellidx < maxcellidx; cellidx++) { c = afs_GetCellByIndex(cellidx, READ_LOCK, 0 /* don't refresh */); if (!c) continue; @@ -294,9 +297,6 @@ afs_RefreshDynroot() afs_dynroot_addDirEnt(dirHeader, &curPage, &curChunk, "..", 1); linkCount += 2; - /* Reserve space for "." and ".." */ - curChunk += 2; - for (cellidx = 0; cellidx < maxcellidx; cellidx++) { c = afs_GetCellByIndex(cellidx, READ_LOCK, 0 /* don't refresh */); if (!c) continue; -- 2.39.5