From 61f86638d8a656101bb0f9c41c55d9685f8a2357 Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Mon, 10 Dec 2012 14:06:01 -0500 Subject: ext4: let empty_dir handle inline dir empty_dir is used when deleting a dir. So it should handle inline dir properly. Signed-off-by: Tao Ma Signed-off-by: "Theodore Ts'o" --- fs/ext4/namei.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fs/ext4/namei.c') diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index a32228a73df0..e3e20d0aa299 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2464,6 +2464,14 @@ static int empty_dir(struct inode *inode) struct super_block *sb; int err = 0; + if (ext4_has_inline_data(inode)) { + int has_inline_data = 1; + + err = empty_inline_dir(inode, &has_inline_data); + if (has_inline_data) + return err; + } + sb = inode->i_sb; if (inode->i_size < EXT4_DIR_REC_LEN(1) + EXT4_DIR_REC_LEN(2) || !(bh = ext4_bread(NULL, inode, 0, 0, &err))) { -- cgit v1.2.3