From: Khazhismel Kumykov Date: Fri, 23 Jun 2017 04:29:05 +0000 (-0400) Subject: ext4: return EIO on read error in ext4_find_entry X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6febe6f253a5bb5c7ac2080d688bd4b75e019d4d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Khazhismel Kumykov --- diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 423e1f761768..2a7f2dc7f4dd 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1442,11 +1442,11 @@ restart: 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,