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:
@@ -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))) {
|
||||
|
Reference in New Issue
Block a user