* [PATCH v2] ext4: Fix ext4_error_err save negative errno into superblock
@ 2021-04-01 7:40 Ye Bin
2021-04-02 1:21 ` Andreas Dilger
0 siblings, 1 reply; 2+ messages in thread
From: Ye Bin @ 2021-04-01 7:40 UTC (permalink / raw)
To: tytso, adilger.kernel, linux-ext4, linux-kernel; +Cc: Ye Bin, Liu Zhi Qiang
As read_mmp_block return 1 when failed. read_mmp_block return -EIO when buffer
isn't uptodate.
Fixes: 54d3adbc29f0 ("ext4: save all error info in save_error_info() and
drop ext4_set_errno()")
Reported-by: Liu Zhi Qiang <liuzhiqiang26@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
fs/ext4/mmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.25.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ext4: Fix ext4_error_err save negative errno into superblock
2021-04-01 7:40 [PATCH v2] ext4: Fix ext4_error_err save negative errno into superblock Ye Bin
@ 2021-04-02 1:21 ` Andreas Dilger
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Dilger @ 2021-04-02 1:21 UTC (permalink / raw)
To: Ye Bin
Cc: Theodore Y. Ts'o, Ext4 Developers List,
Linux Kernel Mailing List, Liu Zhi Qiang
[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]
On Apr 1, 2021, at 1:40 AM, Ye Bin <yebin10@huawei.com> wrote:
>
> As read_mmp_block return 1 when failed. read_mmp_block return -EIO when buffer
> isn't uptodate.
Thank you for this second patch. Unfortunately, the commit message
is still confusing/incorrect because it references read_mmp_block()
in the first usage but is actually changing write_mmp_block().
With that change you could add a Reviewed-by label from me.
Cheers, Andreas
> Fixes: 54d3adbc29f0 ("ext4: save all error info in save_error_info() and
> drop ext4_set_errno()")
> Reported-by: Liu Zhi Qiang <liuzhiqiang26@huawei.com>
> Signed-off-by: Ye Bin <yebin10@huawei.com>
> ---
> fs/ext4/mmp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
> }
> --
> 2.25.4
>
Cheers, Andreas
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-02 1:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 7:40 [PATCH v2] ext4: Fix ext4_error_err save negative errno into superblock Ye Bin
2021-04-02 1:21 ` Andreas Dilger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).