From 3f8a159257c4fea0a6fc79dff9a8974f83a98df2 Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Fri, 2 Nov 2001 21:00:41 +0000 Subject: [PATCH] dynamic-root-allocate-space-for-dot-and-dotdot-20011102 no space was being allocated for . and ..; do so --- 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 26d3c1fd5b..9f82b1cded 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 bba3d42ec9..64096a818e 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;