* children which are not EmptyIndex, we flag it
* as EmptyIndex so index lookups know to avoid it.
*/
- if (test_bit(B_InoIdx, &ib->b.flags)) {
- /* Empty InoIdx blocks are allowed. However depth must
- * be 1. This is where we suddenly collapse a now-empty
- * indexing tree.
- */
- if ((ib->depth > 1 && lafs_index_empty(ib))) {
- ib->depth = 1;
- LAFSI(ib->b.inode)->depth = 1;
- lafs_clear_index(ib);
- }
- /* Don't need to dirty the inode - the fact that we just
- * did incorporation should ensure it is already dirty
- */
- goto out2;
- }
if (ib->depth > 1 && ! lafs_index_empty(ib))
goto out2;
if (ib->depth > 1) {
if (non_empty)
goto out2;
}
+ if (test_bit(B_InoIdx, &ib->b.flags)) {
+ /* Empty InoIdx blocks are allowed. However depth must
+ * be 1. This is where we suddenly collapse a now-empty
+ * indexing tree.
+ */
+ if (ib->depth > 1) {
+ ib->depth = 1;
+ LAFSI(ib->b.inode)->depth = 1;
+ lafs_clear_index(ib);
+ }
+ /* Don't need to dirty the inode - the fact that we just
+ * did incorporation should ensure it is already dirty
+ */
+ goto out2;
+ }
if (ib->depth == 1 &&
(lafs_leaf_next(ib, 0) != 0xFFFFFFFF ||
!list_empty(&ib->children)))