]>
Commit | Line | Data |
---|---|---|
f15b2821 GKH |
1 | From f39b3f45dbcb0343822cce31ea7636ad66e60bc2 Mon Sep 17 00:00:00 2001 |
2 | From: Eric Sandeen <sandeen@redhat.com> | |
3 | Date: Sun, 29 Jul 2018 17:13:42 -0400 | |
4 | Subject: ext4: reset error code in ext4_find_entry in fallback | |
5 | ||
6 | From: Eric Sandeen <sandeen@redhat.com> | |
7 | ||
8 | commit f39b3f45dbcb0343822cce31ea7636ad66e60bc2 upstream. | |
9 | ||
10 | When ext4_find_entry() falls back to "searching the old fashioned | |
11 | way" due to a corrupt dx dir, it needs to reset the error code | |
12 | to NULL so that the nonstandard ERR_BAD_DX_DIR code isn't returned | |
13 | to userspace. | |
14 | ||
15 | https://bugzilla.kernel.org/show_bug.cgi?id=199947 | |
16 | ||
17 | Reported-by: Anatoly Trosinenko <anatoly.trosinenko@yandex.com> | |
18 | Reviewed-by: Andreas Dilger <adilger@dilger.ca> | |
19 | Signed-off-by: Eric Sandeen <sandeen@redhat.com> | |
20 | Signed-off-by: Theodore Ts'o <tytso@mit.edu> | |
21 | Cc: stable@vger.kernel.org | |
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
23 | ||
24 | --- | |
25 | fs/ext4/namei.c | 1 + | |
26 | 1 file changed, 1 insertion(+) | |
27 | ||
28 | --- a/fs/ext4/namei.c | |
29 | +++ b/fs/ext4/namei.c | |
30 | @@ -1401,6 +1401,7 @@ static struct buffer_head * ext4_find_en | |
31 | goto cleanup_and_exit; | |
32 | dxtrace(printk(KERN_DEBUG "ext4_find_entry: dx failed, " | |
33 | "falling back\n")); | |
34 | + ret = NULL; | |
35 | } | |
36 | nblocks = dir->i_size >> EXT4_BLOCK_SIZE_BITS(sb); | |
37 | if (!nblocks) { |