From: NeilBrown Date: Thu, 10 Jun 2010 06:02:14 +0000 (+1000) Subject: grow_index_tree: handle B_Root correctly X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=5ed43a3a5cf040beeee00eac34144f57585b89c8;p=LaFS.git grow_index_tree: handle B_Root correctly When a grow the index tree for the root inode, the B_Root bit needs to be moved to the new block. Signed-off-by: NeilBrown --- diff --git a/modify.c b/modify.c index 4f70400..ac67430 100644 --- a/modify.c +++ b/modify.c @@ -454,8 +454,10 @@ static void grow_index_tree(struct indexblock *ib, struct indexblock *new) ib->data = new->data; new->data = NULL; clear_bit(B_InoIdx, &ib->b.flags); lafs_hash_iblock(ib); - set_bit(B_InoIdx, &new->b.flags); + if (test_and_clear_bit(B_Root, &ib->b.flags)) + set_bit(B_Root, &new->b.flags); + new->b.fileaddr = 0; new->b.inode = ib->b.inode; new->b.parent = ib->b.parent;