]> git.neil.brown.name Git - LaFS.git/commitdiff
truncate: when we clear an InoIdx block set the set.
authorNeilBrown <neilb@suse.de>
Thu, 10 Jun 2010 06:34:28 +0000 (16:34 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 13 Jun 2010 07:20:00 +0000 (17:20 +1000)
We use depth == 0 to saw the index block is empty.
Signed-off-by: NeilBrown <neilb@suse.de>
inode.c

diff --git a/inode.c b/inode.c
index 3c0ca32c1fe7f187863b33309476f4a2def2568a..5d174163b18d6a02e0ed5eb6ca3b9c73fcd6e526 100644 (file)
--- a/inode.c
+++ b/inode.c
@@ -814,6 +814,7 @@ void lafs_inode_handle_orphan(struct datablock *b)
                lafs_dirty_iblock(ib);
                lafs_walk_leaf_index(ib, prune, ib);
                lafs_clear_index(ib);
+               ib->depth = 0;
        }
        if (test_bit(B_Dirty, &ib->b.flags))
                lafs_incorporate(fs, ib);