summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2018-07-30 00:13:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-05 10:16:22 +0300
commit1f9e5416abb6e0dd67761c846440148307002c85 (patch)
tree520f84815cc7b3b2fcb4957443758492f29e7272
parentef2d2e24f2123445a4bef1f604499b0bf80057c8 (diff)
downloadlinux-1f9e5416abb6e0dd67761c846440148307002c85.tar.xz
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 <anatoly.trosinenko@yandex.com> Reviewed-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/ext4/namei.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 7c023859ba04..3217ca0e8dd4 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1242,6 +1242,7 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
return bh;
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) {