struct dir_ent de;
int err;
- /* FIXME if there was an IOerror, this should not be a BUG */
- LAFS_BUG(!test_bit(B_Valid, &b->b.flags), &b->b);
dprintk("HANDLE ORPHAN h=%x %s\n", (unsigned)hash, strblk(&b->b));
lafs_checkpoint_lock(fs);
+ if (!test_bit(B_Valid, &b->b.flags)) {
+ /* probably have already erased this block,
+ * but the orphan_release failed due to
+ * space being tight.
+ * just try again
+ */
+ lafs_orphan_release(fs, b);
+ goto abort;
+ }
+
/* First test: Does a chain of deleted entries extend beyond
* the end of this block. i.e. is the last entry deleted.
* If so, look at the next block and see if the chain is still