Skip to content
Snippets Groups Projects
Commit 6a15e725 authored by Theodore Ts'o's avatar Theodore Ts'o Committed by Cheng Jian
Browse files

ext4: save all error info in save_error_info() and drop ext4_set_errno()

mainline inclusion
from mainline-v5.7-rc1
commit 54d3adbc
category: bugfix
bugzilla: 46758
CVE: NA

-----------------------------------------------

Using a separate function, ext4_set_errno() to set the errno is
problematic because it doesn't do the right thing once
s_last_error_errorcode is non-zero.  It's also less racy to set all of
the error information all at once.  (Also, as a bonus, it shrinks code
size slightly.)

Link: https://lore.kernel.org/r/20200329020404.686965-1-tytso@mit.edu


Fixes: 878520ac ("ext4: save the error code which triggered...")
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>

conflicts:
fs/ext4/balloc.c
fs/ext4/block_validity.c
fs/ext4/ialloc.c
fs/ext4/inode.c
fs/ext4/namei.c
fs/ext4/super.c

Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
Reviewed-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent 84d9f3f5
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment