From patchwork Mon Apr 16 11:39:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [18/32] debugfs: make rmdir cmd support inline data Date: Mon, 16 Apr 2012 01:39:53 -0000 From: Zheng Liu X-Patchwork-Id: 152802 Message-Id: <1334576407-4007-19-git-send-email-wenqing.lz@taobao.com> To: linux-ext4@vger.kernel.org Cc: Zheng Liu From: Zheng Liu Signed-off-by: Zheng Liu --- debugfs/debugfs.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 17e5ec8..7a97c48 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -1948,8 +1948,12 @@ void do_rmdir(int argc, char *argv[]) rds.parent = 0; rds.empty = 1; - retval = ext2fs_dir_iterate2(current_fs, inode_num, 0, - 0, rmdir_proc, &rds); + if (ext2fs_has_inline_data(current_fs, inode_num)) + retval = ext2fs_inline_data_iterate2(current_fs, inode_num, 0, + 0, rmdir_proc, &rds); + else + retval = ext2fs_dir_iterate2(current_fs, inode_num, 0, + 0, rmdir_proc, &rds); if (retval) { com_err(argv[0], retval, "while iterating over directory"); return;