]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-dynamic-root-allocate-space-for-dot-and-dotdot-20011102
authorNickolai Zeldovich <kolya@mit.edu>
Wed, 20 Nov 2002 03:05:17 +0000 (03:05 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 20 Nov 2002 03:05:17 +0000 (03:05 +0000)
reserve space for . and .. in dynroot/freelance
fix my (shadow@dementia.org) screwup

src/afs/afs_dynroot.c

index e42714b2cb8de24d9d4657e4e0a01f7a9b5b8a7e..b90d968bcf211fc98b3969f5d4f698dac85d46bb 100644 (file)
@@ -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;
@@ -294,9 +297,6 @@ 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, 0 /* don't refresh */);
        if (!c) continue;