If the orphan handler is going to dirty a block, it must
first pin it (and check for errors), and must afterwards remove
the PinPending.
One of the places which caused change did this. The other didn't.
err = lafs_make_orphan_nb(fs, b2);
unmap_dblock(b2, buf2);
putdref(b2, MKREF(dir_orphan));
+ if (err)
+ goto abort;
+ err = lafs_pin_dblock(b, ReleaseSpace);
if (err)
goto abort;
buf = map_dblock(b);
lafs_dir_del_ent(buf, bits, seed, hash);
lafs_dirty_dblock(b);
+ clear_bit(B_PinPending, &b->b.flags);
}
if (lafs_dir_empty(buf)) {