Commit 6febe6f2 authored by Khazhismel Kumykov's avatar Khazhismel Kumykov Committed by Theodore Ts'o

ext4: return EIO on read error in ext4_find_entry

Previously, a read error would be ignored and we would eventually return
NULL from ext4_find_entry, which signals "no such file or directory". We
should be returning EIO.
Signed-off-by: default avatarKhazhismel Kumykov <khazhy@google.com>
parent 9ce0151a
......@@ -1442,11 +1442,11 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
goto next;
wait_on_buffer(bh);
if (!buffer_uptodate(bh)) {
/* read error, skip block & hope for the best */
EXT4_ERROR_INODE(dir, "reading directory lblock %lu",
(unsigned long) block);
brelse(bh);
goto next;
ret = ERR_PTR(-EIO);
goto cleanup_and_exit;
}
if (!buffer_verified(bh) &&
!is_dx_internal_node(dir, block,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment