]> git.neil.brown.name Git - LaFS.git/commitdiff
lafs_incorporate: bug on not dirty.
authorNeilBrown <neilb@suse.de>
Tue, 8 Jun 2010 08:25:18 +0000 (18:25 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 10 Jun 2010 06:05:09 +0000 (16:05 +1000)
We already had some of these, but a few more doesn't hurt :-)

Signed-off-by: NeilBrown <neilb@suse.de>
modify.c

index 97aa2d7221134cf8000aeadb6fc884c558715d62..6da632ec95f64db864743db97e3094d4402eed18 100644 (file)
--- 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;