Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54A8DC05027 for ; Fri, 10 Feb 2023 02:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231135AbjBJC5S (ORCPT ); Thu, 9 Feb 2023 21:57:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230246AbjBJC5G (ORCPT ); Thu, 9 Feb 2023 21:57:06 -0500 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2C6066EEF; Thu, 9 Feb 2023 18:57:04 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4PCdgH4XyGz4f3l7T; Fri, 10 Feb 2023 10:56:59 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP3 (Coremail) with SMTP id _Ch0CgCHgR96suVjIkgqDA--.35208S8; Fri, 10 Feb 2023 10:57:01 +0800 (CST) From: Ye Bin To: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org Cc: linux-kernel@vger.kernel.org, jack@suse.cz, Ye Bin Subject: [PATCH v2 4/6] ext4: remove backup for super block when recovery journal Date: Fri, 10 Feb 2023 11:20:42 +0800 Message-Id: <20230210032044.146115-5-yebin@huaweicloud.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230210032044.146115-1-yebin@huaweicloud.com> References: <20230210032044.146115-1-yebin@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _Ch0CgCHgR96suVjIkgqDA--.35208S8 X-Coremail-Antispam: 1UD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t4xhlfz01xgou0bp/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ye Bin As previous commit "jbd2: do extra handle when do journal recovery" already do extra handle for super block. There's no need to do in ext4_load_journal(), so remove it. Signed-off-by: Ye Bin --- fs/ext4/super.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index ea0fea04907c..d86ee5af2db9 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5916,17 +5916,8 @@ static int ext4_load_journal(struct super_block *sb, if (!ext4_has_feature_journal_needs_recovery(sb)) err = jbd2_journal_wipe(journal, !really_read_only); - if (!err) { - char *save = kmalloc(EXT4_S_ERR_LEN, GFP_KERNEL); - if (save) - memcpy(save, ((char *) es) + - EXT4_S_ERR_START, EXT4_S_ERR_LEN); + if (!err) err = jbd2_journal_load(journal); - if (save) - memcpy(((char *) es) + EXT4_S_ERR_START, - save, EXT4_S_ERR_LEN); - kfree(save); - } if (err) { ext4_msg(sb, KERN_ERR, "error loading journal"); -- 2.31.1