]> git.neil.brown.name Git - LaFS.git/commitdiff
Don't accept failure from lafs_add_block_address
authorNeilBrown <neilb@suse.de>
Tue, 25 Aug 2009 07:09:52 +0000 (17:09 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 25 Aug 2009 07:09:52 +0000 (17:09 +1000)
If this returns 0, it didn't add the address, so we need to
call it repeatedly.

index.c

diff --git a/index.c b/index.c
index 73005eefb7a141b7dfd7ab22c405b343b00c12e8..a371b4f4237d7755824b58a5f7493222db997ddf 100644 (file)
--- a/index.c
+++ b/index.c
@@ -583,7 +583,10 @@ void lafs_phase_flip(struct fs *fs, struct block *b)
                ulist = b2->chain;
                b2->chain = NULL;
                clear_bit(B_Uninc, &b2->flags);
-               lafs_add_block_address(fs, b2);
+               while (lafs_add_block_address(fs, b2) == 0)
+                       /* FIXME do I need more like I do in 
+                        * lafs_allocated_block */
+                       ;
                putref(b2, MKREF(uninc));
        }
        LAFS_BUG(ib->uninc_next, &ib->b);