aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sandeen <[email protected]>2018-07-29 17:13:42 -0400
committerTheodore Ts'o <[email protected]>2018-07-29 17:13:42 -0400
commitf39b3f45dbcb0343822cce31ea7636ad66e60bc2 (patch)
treee206062f7bcece8f17310afb9b8d5dab6bb1424f
parent430657b6be896db57d974375cc499ca212c7f01d (diff)
ext4: reset error code in ext4_find_entry in fallback
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 <[email protected]> Reviewed-by: Andreas Dilger <[email protected]> Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]> Cc: [email protected]
-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 2a4c25c4681d..116ff68c5bd4 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1398,6 +1398,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) {