public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: Fix ext4_error_err save negative errno into superblock
@ 2021-04-01  7:22 Ye Bin
  2021-04-02  1:11 ` Andreas Dilger
  0 siblings, 1 reply; 2+ messages in thread
From: Ye Bin @ 2021-04-01  7:22 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, so just pass retval to
save_error_info.

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..bb8353e25841 100644
--- a/fs/ext4/mmp.c
+++ b/fs/ext4/mmp.c
@@ -171,7 +171,7 @@ static int kmmpd(void *data)
 		 */
 		if (retval) {
 			if ((failed_writes % 60) == 0) {
-				ext4_error_err(sb, -retval,
+				ext4_error_err(sb, retval,
 					       "Error writing to MMP block");
 			}
 			failed_writes++;
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-02  1:12 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:22 [PATCH] ext4: Fix ext4_error_err save negative errno into superblock Ye Bin
2021-04-02  1:11 ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox