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 <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
Tao Ma
2012-12-10 14:06:01 -05:00
committed by Theodore Ts'o
父節點 9f40fe5463
當前提交 61f86638d8
共有 3 個文件被更改,包括 104 次插入0 次删除

查看文件

@@ -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))) {