From: Nickolai Zeldovich Date: Wed, 20 Nov 2002 03:05:17 +0000 (+0000) Subject: STABLE12-dynamic-root-allocate-space-for-dot-and-dotdot-20011102 X-Git-Tag: openafs-stable-1_2_8~22 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c136c332508705b013def8bdf45ee1176b2c39ed;p=packages%2Fo%2Fopenafs.git STABLE12-dynamic-root-allocate-space-for-dot-and-dotdot-20011102 reserve space for . and .. in dynroot/freelance fix my (shadow@dementia.org) screwup --- 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;