Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp271563pxf; Thu, 1 Apr 2021 00:15:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzR/j+C/kQkLKKb/pXbf7J0ldeW1CMbnFjGLJwLDvHb0jlFOGBzUWoFK+3juj5gsGrIBoB X-Received: by 2002:a17:906:340f:: with SMTP id c15mr7886156ejb.317.1617261348909; Thu, 01 Apr 2021 00:15:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617261348; cv=none; d=google.com; s=arc-20160816; b=pInbk+Qne3AaUCHGjvLAgw90kVrqXYDB9GGt/Mj96oIec9cz+9KesuB60emFrCTcd3 bGPx4pbWYEXaLWyOCweyck6a3cgPMWP+e2yKUoJP3nI9SHM7oLC+BLqArv8E9aM/oMGf h9iAbB1aUa9uij2OE9//MGAEGc0ezuqX9GaM5hBL/XltT5o8JSFPazvWKHQt95TWKQmG tBDx/DypVP7hTSNOPWstMPejgF23S/dfuzm1ARw8yOww04819BoYwvo/xPP7i7MNPbSL b4/1t/4DFesBZQwGElL0Chaurdi0gNKxvJcEF7xuJROppbTdmcBaznelGoyLpru14Jrh Y/XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=cGu9mG+AE8nSPKbOCoU5/40bAgjJp5plFD6PAdSuMPo=; b=N6coPRh7D9EP2g4JknU9GifYCo89Im19YfXR6soFsDE8ECF+0LcBtAnPNLE/KhjPnh Nx7poAXAcsismoT3EZjBzjfAP89LrZJBPH39DB0iXgm4UHGslavL7BmcJS3//RM5q5D4 gx0uOg4ikdLrkKrYogxPmZ+3rvMv95luXpOj4vdWkVTU0sjoZMnZhARxTr/eKdqXfyCZ HJ4zNGBVXlaCD0fhC9s0CWrEJO5ferpmrht52dUqjuuHrpKDk1QBIF3dEtGThulRVFIy Q5Bbl6yqv0jMIvqDn7Wi6h2LVbperswJ21yrSc6MjVjYywmpuEb7SV22aSQLbc0NUVV9 ap3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb2si3885991ejc.547.2021.04.01.00.15.24; Thu, 01 Apr 2021 00:15:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233376AbhDAHOu (ORCPT + 99 others); Thu, 1 Apr 2021 03:14:50 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15063 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233227AbhDAHOr (ORCPT ); Thu, 1 Apr 2021 03:14:47 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4F9vWR4LVgzPn2X; Thu, 1 Apr 2021 15:12:03 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.498.0; Thu, 1 Apr 2021 15:14:36 +0800 From: Ye Bin To: , , , CC: Ye Bin , Liu Zhi Qiang Subject: [PATCH] ext4: Fix ext4_error_err save negative errno into superblock Date: Thu, 1 Apr 2021 15:22:34 +0800 Message-ID: <20210401072234.3338057-1-yebin10@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 Signed-off-by: Ye Bin --- 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