]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: save all error info in save_error_info() and drop ext4_set_errno()
authorTheodore Ts'o <tytso@mit.edu>
Sat, 28 Mar 2020 23:33:43 +0000 (19:33 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 1 Apr 2020 21:29:06 +0000 (17:29 -0400)
commitd24b85b1e620a7329397ab1210a1f872c77be777
tree485a4098e4523ed56c97b308c324f8cf91e5a51f
parent0a92935ff97ef65f8e55fd7f330e5eea137a8e2b
ext4: save all error info in save_error_info() and drop ext4_set_errno()

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: 8a0a4835e98a ("ext4: save the error code which triggered...")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 files changed:
fs/ext4/balloc.c
fs/ext4/block_validity.c
fs/ext4/ext4.h
fs/ext4/ext4_jbd2.c
fs/ext4/extents.c
fs/ext4/ialloc.c
fs/ext4/indirect.c
fs/ext4/inline.c
fs/ext4/inode.c
fs/ext4/mballoc.c
fs/ext4/mmp.c
fs/ext4/move_extent.c
fs/ext4/namei.c
fs/ext4/super.c
fs/ext4/xattr.c