From: NeilBrown Date: Thu, 10 Jun 2010 06:37:03 +0000 (+1000) Subject: incorporate: don't leave ->depth at 0 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=c5b21eb63e01b2f1c3ad5e030f9734ab4248f492;p=LaFS.git incorporate: don't leave ->depth at 0 When we incorporate a block make sure the depth doesn't stay 0 unless it really is empty. Signed-off-by: NeilBrown --- diff --git a/modify.c b/modify.c index 1a519e8..a6ef2e7 100644 --- 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;