diff options
| author | Ye Bin <[email protected]> | 2021-04-06 10:53:31 +0800 |
|---|---|---|
| committer | Theodore Ts'o <[email protected]> | 2021-04-09 20:58:30 -0400 |
| commit | 6810fad956df9e5467e8e8a5ac66fda0836c71fa (patch) | |
| tree | c944921031972df5ffdf52f7fc3dc5795f59b9cb | |
| parent | f88f1466e2a2e5ca17dfada436d3efa1b03a3972 (diff) | |
ext4: fix ext4_error_err save negative errno into superblock
Fix As write_mmp_block() so that it returns -EIO instead of 1, so that
the correct error gets saved into the superblock.
Cc: [email protected]
Fixes: 54d3adbc29f0 ("ext4: save all error info in save_error_info() and drop ext4_set_errno()")
Reported-by: Liu Zhi Qiang <[email protected]>
Signed-off-by: Ye Bin <[email protected]>
Reviewed-by: Andreas Dilger <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
| -rw-r--r-- | fs/ext4/mmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c index 795c3ff2907c..68fbeedd627b 100644 --- a/fs/ext4/mmp.c +++ b/fs/ext4/mmp.c @@ -56,7 +56,7 @@ static int write_mmp_block(struct super_block *sb, struct buffer_head *bh) wait_on_buffer(bh); sb_end_write(sb); if (unlikely(!buffer_uptodate(bh))) - return 1; + return -EIO; return 0; } |