lafs_iounlock_block(b);
if (test_bit(B_EmptyIndex, &b->flags)) {
+ int credits = 0;
lafs_allocated_block(fs, b, 0);
+ /* FIXME this is common code - make a function?? */
+ if (cnum) {
+ if (test_and_clear_bit(B_Realloc, &b->flags))
+ credits++;
+ LAFS_BUG(test_bit(B_Dirty, &b->flags), b);
+ } else {
+ if (test_and_clear_bit(B_Dirty, &b->flags))
+ credits++;
+ if (test_and_clear_bit(B_Realloc, &b->flags))
+ credits++;
+ }
+ lafs_space_return(fs, credits);
lafs_writeback_done(b);
mutex_unlock(&wc->lock);
return wc->cluster_seq; /* FIXME is this really needed - or right */