From: NeilBrown Date: Tue, 8 Jun 2010 08:25:18 +0000 (+1000) Subject: lafs_incorporate: bug on not dirty. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=cc9d8eec0c1c9b5503dfcb3fc780e8dd69e14167;p=LaFS.git lafs_incorporate: bug on not dirty. We already had some of these, but a few more doesn't hurt :-) Signed-off-by: NeilBrown --- diff --git a/modify.c b/modify.c index 97aa2d7..6da632e 100644 --- a/modify.c +++ b/modify.c @@ -1638,6 +1638,9 @@ void lafs_incorporate(struct fs *fs, struct indexblock *ib) LAFS_BUG(!test_bit(B_IOLock, &ib->b.flags), &ib->b); + LAFS_BUG(!test_bit(B_Dirty, &ib->b.flags) && + !test_bit(B_Realloc, &ib->b.flags), &ib->b); + LAFS_BUG(!test_bit(B_Valid, &ib->b.flags) && ib->depth > 0, &ib->b); if (ib->depth <= 1) { @@ -1801,6 +1804,8 @@ void lafs_incorporate(struct fs *fs, struct indexblock *ib) case 1: /* everything was incorporated - hurray */ lafs_iounlock_block(&new->b); lafs_iblock_free(new); + LAFS_BUG(!test_bit(B_Dirty, &ib->b.flags) && + !test_bit(B_Realloc, &ib->b.flags), &ib->b); /* Don't need to dirty, it is already dirty */ break;