dynamic-root-allocate-space-for-dot-and-dotdot-20011102

no space was being allocated for . and ..; do so
This commit is contained in:
Nickolai Zeldovich 2001-11-02 21:00:41 +00:00 committed by Derrick Brashear
parent ea77b04c29
commit 3f8a159257
2 changed files with 6 additions and 1 deletions

View File

@ -82,7 +82,9 @@ void cm_InitFakeRootDir() {
int curDirEntryInPage = 0; int curDirEntryInPage = 0;
int sizeOfCurEntry; int sizeOfCurEntry;
int dirSize; int dirSize;
/* Reserve 2 directory chunks for "." and ".." */
curChunk += 2;
while (curDirEntry!=cm_noLocalMountPoints) { while (curDirEntry!=cm_noLocalMountPoints) {
sizeOfCurEntry = cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0); sizeOfCurEntry = cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0);

View File

@ -229,6 +229,9 @@ afs_RefreshDynroot()
curChunk = 13; curChunk = 13;
curPage = 0; curPage = 0;
/* Reserve space for "." and ".." */
curChunk += 2;
for (cellidx = 0; cellidx < maxcellidx; cellidx++) { for (cellidx = 0; cellidx < maxcellidx; cellidx++) {
c = afs_GetCellByIndex(cellidx, READ_LOCK, 0 /* don't refresh */); c = afs_GetCellByIndex(cellidx, READ_LOCK, 0 /* don't refresh */);
if (!c) continue; if (!c) continue;