From 3ac10cdc47c5164b69e9aa3ad2157abf51a75831 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 21 Jun 2010 10:50:06 +1000 Subject: [PATCH] Don't treat leaf-index blocks with children as empty. They might be now, but they won't be soon. Probably. Signed-off-by: NeilBrown --- modify.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modify.c b/modify.c index 23e6437..4e9e097 100644 --- a/modify.c +++ b/modify.c @@ -1957,7 +1957,9 @@ void lafs_incorporate(struct fs *fs, struct indexblock *ib) } if (ib->depth > 1 && ! lafs_index_empty(ib)) goto out2; - if (ib->depth == 1 && lafs_leaf_next(ib, 0) != 0xFFFFFFFF) + if (ib->depth == 1 && + (lafs_leaf_next(ib, 0) != 0xFFFFFFFF || + !list_empty(&ib->children))) goto out2; /* OK, it is empty now. There are various ways we can handle -- 2.39.5