Skip to content

Commit 6810fad

Browse files
Ye Bintytso
authored andcommitted
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: 54d3adb ("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]>
1 parent f88f146 commit 6810fad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ext4/mmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static int write_mmp_block(struct super_block *sb, struct buffer_head *bh)
5656
wait_on_buffer(bh);
5757
sb_end_write(sb);
5858
if (unlikely(!buffer_uptodate(bh)))
59-
return 1;
59+
return -EIO;
6060

6161
return 0;
6262
}

0 commit comments

Comments
 (0)