From: Nickolai Zeldovich Date: Fri, 2 Nov 2001 21:00:41 +0000 (+0000) Subject: dynamic-root-allocate-space-for-dot-and-dotdot-20011102 X-Git-Tag: openafs-devel-1_3_0~152 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3f8a159257c4fea0a6fc79dff9a8974f83a98df2;p=packages%2Fo%2Fopenafs.git dynamic-root-allocate-space-for-dot-and-dotdot-20011102 no space was being allocated for . and ..; do so --- 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 bba3d42ec..64096a818 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;