]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-dynamic-root-allocate-space-for-dot-and-dotdot-20011102
authorNickolai Zeldovich <kolya@mit.edu>
Thu, 15 Nov 2001 03:31:23 +0000 (03:31 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 15 Nov 2001 03:31:23 +0000 (03:31 +0000)
reserve space for . and .. in dynroot/freelance

src/WINNT/afsd/cm_freelance.c
src/afs/afs_dynroot.c

index 26d3c1fd5b0098a3d9c1c350c4f26d592dac660d..9f82b1cded4d4a56af12ef97e6f60977b933d81a 100644 (file)
@@ -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);
index 6e42e2b234ecfeb79036ac180d9ed76717999dd8..170026ca8bcc31829bce60b7abf56327952ceadd 100644 (file)
@@ -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,