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: 878520ac ("ext4: save the error code which triggered...") Signed-off-by:Theodore Ts'o <tytso@mit.edu>
Showing
- fs/ext4/balloc.c 3 additions, 4 deletionsfs/ext4/balloc.c
- fs/ext4/block_validity.c 7 additions, 11 deletionsfs/ext4/block_validity.c
- fs/ext4/ext4.h 36 additions, 18 deletionsfs/ext4/ext4.h
- fs/ext4/ext4_jbd2.c 4 additions, 9 deletionsfs/ext4/ext4_jbd2.c
- fs/ext4/extents.c 12 additions, 15 deletionsfs/ext4/extents.c
- fs/ext4/ialloc.c 6 additions, 7 deletionsfs/ext4/ialloc.c
- fs/ext4/indirect.c 1 addition, 1 deletionfs/ext4/indirect.c
- fs/ext4/inline.c 6 additions, 7 deletionsfs/ext4/inline.c
- fs/ext4/inode.c 12 additions, 17 deletionsfs/ext4/inode.c
- fs/ext4/mballoc.c 9 additions, 12 deletionsfs/ext4/mballoc.c
- fs/ext4/mmp.c 6 additions, 7 deletionsfs/ext4/mmp.c
- fs/ext4/move_extent.c 2 additions, 2 deletionsfs/ext4/move_extent.c
- fs/ext4/namei.c 12 additions, 12 deletionsfs/ext4/namei.c
- fs/ext4/super.c 78 additions, 88 deletionsfs/ext4/super.c
- fs/ext4/xattr.c 5 additions, 5 deletionsfs/ext4/xattr.c
Please register or sign in to comment