lafs_cluster_allocate(&ib->b, 0);
goto out_unlocked;
}
+
+ lafs_pin_block(&ib->b);
/* It might be that this can happen, in which case
* we simply update trunc_next and loop. But I'd like
* cannot trust next_trunc
*/
if (ib->uninc_table.pending_cnt == 0 &&
- ib->uninc == NULL)
+ ib->uninc == NULL) {
+ lafs_dirty_iblock(ib);
lafs_walk_leaf_index(ib, prune_some, ib);
+ }
lafs_incorporate(fs, ib);
goto out;
}
while (ib->uninc_table.pending_cnt || ib->uninc)
lafs_incorporate(fs, ib);
- if (test_bit(B_Valid, &ib->b.flags))
+ if (test_bit(B_Valid, &ib->b.flags)) {
+ lafs_dirty_iblock(ib);
lafs_walk_leaf_index(ib, prune, ib);
- else {
+ } else {
/* This had better be already clear. */
LAFS_BUG(!test_bit(B_PhysValid, &ib->b.flags), &ib->b);
LAFS_BUG(ib->b.physaddr != 0, &ib->b);