提交 b759debf 编写于 作者: Y Ye Bin 提交者: Yongqiang Liu

Revert "ext4: fix file system corrupted when rmdir non empty directory with IO error"

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I52WOM
CVE: NA

--------------------------------

This reverts commit 35bd50bc.
Signed-off-by: NYe Bin <yebin10@huawei.com>
Reviewed-by: NZhang Yi <yi.zhang@huawei.com>
Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
上级 af98db5f
...@@ -2750,7 +2750,7 @@ bool ext4_empty_dir(struct inode *inode) ...@@ -2750,7 +2750,7 @@ bool ext4_empty_dir(struct inode *inode)
*/ */
bh = ext4_read_dirblock(inode, 0, DIRENT_HTREE); bh = ext4_read_dirblock(inode, 0, DIRENT_HTREE);
if (IS_ERR(bh)) if (IS_ERR(bh))
return false; return true;
de = (struct ext4_dir_entry_2 *) bh->b_data; de = (struct ext4_dir_entry_2 *) bh->b_data;
if (ext4_check_dir_entry(inode, NULL, de, bh, bh->b_data, bh->b_size, if (ext4_check_dir_entry(inode, NULL, de, bh, bh->b_data, bh->b_size,
...@@ -2781,7 +2781,7 @@ bool ext4_empty_dir(struct inode *inode) ...@@ -2781,7 +2781,7 @@ bool ext4_empty_dir(struct inode *inode)
continue; continue;
} }
if (IS_ERR(bh)) if (IS_ERR(bh))
return false; return true;
} }
de = (struct ext4_dir_entry_2 *) (bh->b_data + de = (struct ext4_dir_entry_2 *) (bh->b_data +
(offset & (sb->s_blocksize - 1))); (offset & (sb->s_blocksize - 1)));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册