From: Theodore Ts'o Date: Fri, 23 Jun 2017 04:47:05 +0000 (-0400) Subject: ext4: return EFSBADCRC if a bad checksum error is found in ext4_find_entry() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bdddf342796765a1a946e7c4aed2574f4488e4e5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ext4: return EFSBADCRC if a bad checksum error is found in ext4_find_entry() Previously a bad directory block with a bad checksum is skipped; we should be returning EFSBADCRC (aka EBADMSG). Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 2a7f2dc7f4dd..13f0cadb1238 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1456,7 +1456,8 @@ restart: EXT4_ERROR_INODE(dir, "checksumming directory " "block %lu", (unsigned long)block); brelse(bh); - goto next; + ret = ERR_PTR(-EFSBADCRC); + goto cleanup_and_exit; } set_buffer_verified(bh); i = search_dirblock(bh, dir, &fname,