From ff31bf104159f2d49028ad5d5cbc273ab87404df Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Thu, 15 Nov 2001 03:31:23 +0000 Subject: [PATCH] STABLE12-dynamic-root-allocate-space-for-dot-and-dotdot-20011102 reserve space for . and .. in dynroot/freelance --- src/WINNT/afsd/cm_freelance.c | 4 +++- src/afs/afs_dynroot.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) 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, -- 2.39.5