From: Nickolai Zeldovich Date: Thu, 15 Nov 2001 03:31:23 +0000 (+0000) Subject: STABLE12-dynamic-root-allocate-space-for-dot-and-dotdot-20011102 X-Git-Tag: openafs-stable-1_2_2a~2 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ff31bf104159f2d49028ad5d5cbc273ab87404df;p=packages%2Fo%2Fopenafs.git STABLE12-dynamic-root-allocate-space-for-dot-and-dotdot-20011102 reserve space for . and .. in dynroot/freelance --- diff --git a/src/WINNT/afsd/cm_freelance.c b/src/WINNT/afsd/cm_freelance.c index 26d3c1fd5..9f82b1cde 100644 --- a/src/WINNT/afsd/cm_freelance.c +++ b/src/WINNT/afsd/cm_freelance.c @@ -82,7 +82,9 @@ void cm_InitFakeRootDir() { int curDirEntryInPage = 0; int sizeOfCurEntry; int dirSize; - + + /* Reserve 2 directory chunks for "." and ".." */ + curChunk += 2; while (curDirEntry!=cm_noLocalMountPoints) { sizeOfCurEntry = cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0); diff --git a/src/afs/afs_dynroot.c b/src/afs/afs_dynroot.c index 6e42e2b23..170026ca8 100644 --- a/src/afs/afs_dynroot.c +++ b/src/afs/afs_dynroot.c @@ -253,6 +253,9 @@ 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); afs_dynroot_addDirEnt(dirHeader, &curPage, &curChunk,