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 <neilb@suse.de>
*/
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