From: Eric Sandeen Date: Sun, 29 Jul 2018 21:13:42 +0000 (-0400) Subject: ext4: reset error code in ext4_find_entry in fallback X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=509c0cdfb438e5cc887e75ba42477b499d177164;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ext4: reset error code in ext4_find_entry in fallback commit f39b3f45dbcb0343822cce31ea7636ad66e60bc2 upstream. When ext4_find_entry() falls back to "searching the old fashioned way" due to a corrupt dx dir, it needs to reset the error code to NULL so that the nonstandard ERR_BAD_DX_DIR code isn't returned to userspace. https://bugzilla.kernel.org/show_bug.cgi?id=199947 Reported-by: Anatoly Trosinenko Reviewed-by: Andreas Dilger Signed-off-by: Eric Sandeen Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 6747861f9b70..1db39e12e02b 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1397,6 +1397,7 @@ static struct buffer_head * ext4_find_entry (struct inode *dir, goto cleanup_and_exit; dxtrace(printk(KERN_DEBUG "ext4_find_entry: dx failed, " "falling back\n")); + ret = NULL; } nblocks = dir->i_size >> EXT4_BLOCK_SIZE_BITS(sb); if (!nblocks) {