Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4014154pxf; Mon, 22 Mar 2021 23:43:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQjebVLUgPel1GaBm2H9glk6tNjlnywsfc2LdFCU1KjbFwFeSVxRESAIz5hR8TY/KD6hCO X-Received: by 2002:a17:906:4cd9:: with SMTP id q25mr1471695ejt.187.1616481827756; Mon, 22 Mar 2021 23:43:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616481827; cv=none; d=google.com; s=arc-20160816; b=e/28mxUK0VzL6zix7SxLZjAwydU2yCrcAxgjYnyYZOsjAD1CG8eRZZWLJjwPUt1i0r ClWtJzbiKaLZVCgfAal36AlzYfAySu5F+cJUS1A8SnJNIdeNA+CnlxFmIYxznK+p6G7M alMqyVckCHjYydtW9kgVUjy+M7yAucL2gRpcWvakrlCk07QoyLeQMwwy+BDASu/OHWu2 8A8JmOBPpn2oWRRs+tWLUTGHe9RG/ytHBC3IIr8OdfTuXwdZ4YcaeWAW5jmrE/x9yt61 7gQyrnnat9FAbdC2TAqpFuB2yVQPPaBbR5gDpiTmY24z2dTHQYrxCxGMb+irFJnO6CjU AcWw== 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=SZCR796k2Sn9wdgwSGlsA3JS4X443/F6ojaNPY6FENA=; b=FmZs9d6DiWjL9CLRjnwNHHN+Xe3GExtWPvO7UaN76jLIjU8eJxeZGxWjV/04gRtjqF QaLdGdV9bBHnG4DipQlcdyi+UFFcRW63cYF3vAwvD0zioMjATHydvDOLphpcYnvYIBdK s68aJWylm2l7BZOSoYnrhwX/5X4rH1vghlO7IFaWxNA8abQOc2t8CpUHL9ror5ElrEUm wTvaT5MRhThttd/Etsu5NRtF4yWyR73l01iAxPn2A46SPg3XBYkAXnm+mkpb8aiP48fX 8BcyOmNHj+DiJ3sLN34skkBJ/XKBWpdeGMla8GxbTDnaH6A6dY2hnxNV87GSLfg9UNc6 Tb5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 n4si13414148ejz.464.2021.03.22.23.43.24; Mon, 22 Mar 2021 23:43:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S229437AbhCWGmT (ORCPT + 99 others); Tue, 23 Mar 2021 02:42:19 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:14064 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbhCWGmF (ORCPT ); Tue, 23 Mar 2021 02:42:05 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4F4MD52N5yzNq8r; Tue, 23 Mar 2021 14:39:33 +0800 (CST) Received: from szvp000203569.huawei.com (10.120.216.130) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Tue, 23 Mar 2021 14:41:56 +0800 From: Chao Yu To: CC: , , , Chao Yu Subject: [PATCH] Revert "f2fs: give a warning only for readonly partition" Date: Tue, 23 Mar 2021 14:41:55 +0800 Message-ID: <20210323064155.12582-1-yuchao0@huawei.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.120.216.130] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 938a184265d75ea474f1c6fe1da96a5196163789. Because that commit fails generic/050 testcase which expect failure during mount a recoverable readonly partition. Fixes: 938a184265d7 ("f2fs: give a warning only for readonly partition") Signed-off-by: Chao Yu --- fs/f2fs/super.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index b48281642e98..2b78ee11f093 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -3952,10 +3952,12 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) * previous checkpoint was not done by clean system shutdown. */ if (f2fs_hw_is_readonly(sbi)) { - if (!is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG)) + if (!is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG)) { + err = -EROFS; f2fs_err(sbi, "Need to recover fsync data, but write access unavailable"); - else - f2fs_info(sbi, "write access unavailable, skipping recovery"); + goto free_meta; + } + f2fs_info(sbi, "write access unavailable, skipping recovery"); goto reset_checkpoint; } -- 2.29.2