]> git.neil.brown.name Git - LaFS.git/commitdiff
incorporate: don't leave ->depth at 0
authorNeilBrown <neilb@suse.de>
Thu, 10 Jun 2010 06:37:03 +0000 (16:37 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 13 Jun 2010 07:20:00 +0000 (17:20 +1000)
When we incorporate a block make sure the depth
doesn't stay 0 unless it really is empty.

Signed-off-by: NeilBrown <neilb@suse.de>
modify.c

index 1a519e887148bf2007d2f696c2836c486d7fa559..a6ef2e7178eb67d0f884d52041d84d6108c5b855 100644 (file)
--- a/modify.c
+++ b/modify.c
@@ -1922,6 +1922,9 @@ void lafs_incorporate(struct fs *fs, struct indexblock *ib)
         * first block in the parent, we need to recurse up and
         * resolve the parent in the same way.
         */
+       if (ib->depth == 0)
+               /* Probably has entries now.  If not, will reset soon anyway */
+               ib->depth = 1;
        if (!list_empty(&ib->children))
                /* If there are children, we cannot treat this block as empty. */
                return;