[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080531041906.GF3380@mit.edu>
Date: Sat, 31 May 2008 00:19:06 -0400
From: Theodore Tso <tytso@....edu>
To: Eric Sandeen <sandeen@...hat.com>
Cc: ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH e2fsprogs] delete unused nodes in ext2fs_extent_delete
One more addition. If we delete the last entry in the root inode, we
need to set the depth of the tree to 0.
- Ted
diff --git a/lib/ext2fs/extent.c b/lib/ext2fs/extent.c
index 19d7feb..65b2003 100644
--- a/lib/ext2fs/extent.c
+++ b/lib/ext2fs/extent.c
@@ -1248,7 +1248,8 @@ errcode_t ext2fs_extent_delete(ext2_extent_handle_t handle, int flags)
} else {
eh = (struct ext3_extent_header *) path->buf;
eh->eh_entries = ext2fs_cpu_to_le16(path->entries);
-
+ if ((path->entries == 0) && (handle->level == 0))
+ eh->eh_depth = handle->max_depth = 0;
retval = update_path(handle);
}
return retval;
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists