From bfd2c2c5d47dcc24376b80623dd32db268c7ddb6 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sat, 5 Mar 2011 10:44:23 +1100 Subject: [PATCH] fix a BUG assertion in lafs_dirty_iblock. The InoIdx block for an inode with depth==0 is not Valid, as it contains no index information. However it still can be appropriate to mark it dirty when a data block is allocated, to ensure incorporation happens correctly. So it is not a bug to dirty a non-Valid iblock - at least if the depth is 0. Signed-off-by: NeilBrown --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index 85758cf..622ebcd 100644 --- a/block.c +++ b/block.c @@ -655,7 +655,7 @@ lafs_dirty_iblock(struct indexblock *b, int want_realloc) */ LAFS_BUG(!test_bit(B_Pinned, &b->b.flags), &b->b); - LAFS_BUG(!test_bit(B_Valid, &b->b.flags), &b->b); + LAFS_BUG(!test_bit(B_Valid, &b->b.flags) && b->depth > 0, &b->b); if (want_realloc) { /* Try to make for Realloc instead. If we cannot get the -- 2.39.5