Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1421219lqh; Mon, 6 May 2024 07:19:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2xGuHy113jZtIA906AbSOzIR1L2I37X+HqBw2Y/hJvfHcYn+oP70AGLfr2TaycFTw8cVex/pjPasMSUC/DfyrjkIU9D6WPiPAMmebbQ== X-Google-Smtp-Source: AGHT+IGPgueTJn1sUqw1gbjIdIBZ1LWOhgFbWli1TSYD/hkCnj16X180AE7hYSqQ7lKa9I9lqJgP X-Received: by 2002:a50:d7d4:0:b0:572:a6fe:f7e7 with SMTP id m20-20020a50d7d4000000b00572a6fef7e7mr9289620edj.20.1715005157021; Mon, 06 May 2024 07:19:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715005157; cv=pass; d=google.com; s=arc-20160816; b=E9/h2tBEgBIekYY1497jKuZ66DH5VmmiIvAaWns36nvWsFX9WdhQhlg+XQtS/PXTuk BVRMwCpPbnEi6PObrY6630sW5CtoPWtbz0H1euKZrKRmJRocg+oGIdDOpZ4F9YwDHm72 ghRtBgbPtIgFfZT6bpfbublKT9FYxXY6bdUCSi6H8W+A3UgNuw9lJy/w91MhrYa1cTAZ cJwN2cTQ3DaNW0rco2h+l7rStLZux13ItXpXLpGb+veGMc/jllNrZhvmzUjQiy06OVqM Lf0A7KQyycGGr/bSlfJsf3acjF4R6gIEBNouIx9KwU0N4Yc60i4Npx0CxbBRNBQwF592 d89Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=l07kubY1CQErVcvsaD3eA3vnDwzze4Wd0LklSDWOYgA=; fh=dnh1YrsUyt5UgYK26rqA81QDdkEcBUOSvIufnHNyJEY=; b=RRdVZSWKsJFtBrHF2Rv2tZJMX/FbGqjzvdOF7cXVdMnSGgRr3mNLBCCIxzynyn/3qC lIRo/Uj8uI05/lqqQZqu1S/y3O/X+02egLODQUdMQWK8HC+baz/0AWnRH53dNyZ7iYlL z36G/I2DawFJmAK0HpqXTLAbrVzEdc9t6hvWhvmcP6e3rUYFVj2szjaGGaNRFGCDYiuC skwglFg845dvALOLfnrYB5r4FTKwwHXEajq40Uu2uVZTHao5n0u33a3XQJJvMpgv292p QwX/lI71h7MGWrOYkqkIAbA81nzGjSDZllptatXmQXormblBgAjB1mcMd5/MVyB4JnQY gJoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-ext4+bounces-2319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2319-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j17-20020a508a91000000b00572b3650955si4838037edj.662.2024.05.06.07.19.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 07:19:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-ext4+bounces-2319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2319-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BC0981F22800 for ; Mon, 6 May 2024 14:19:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91FBE13D531; Mon, 6 May 2024 14:18:30 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BBCD13D2B0; Mon, 6 May 2024 14:18:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005110; cv=none; b=bCft3hkSDRT5fz7POkvgS7ipWjsN+o8NthNkJZd+L2RQW/6cTZ29+oIO+dRx0JvcS3ImVIaQLjTFPu3bZ4oUgh0KbPXZFxMERCm+8CfpUhNkwlsS1xJnKUwB1xoJ8Zo12XGdKiETh3W5XN5/5QQghe47oGkcPuJPrfrV89vb4Vw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005110; c=relaxed/simple; bh=QQwEt7VSIvBikGCac88Bofue0zCMu1gHYn2Q/Kx54s0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eLH5xxeF7xvBmfeD0ZODrH8QT/oN/j02OV5IfyZcMdBlte7jKJgAtD0v2iLfgPowv61EcU3JiN3ElJyQG9Cq6F9+m7MG/abHunoLd2Jh5foRsR2RrbahFH4zB487Z/5YvcYfIp/vCLCxMkfSnks7TCCmbJIChVYN1btxbf5EuYI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4VY3RF3Qhkz4f3kG9; Mon, 6 May 2024 22:18:17 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id A7EEC1A0568; Mon, 6 May 2024 22:18:25 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP1 (Coremail) with SMTP id cCh0CgAH2RGu5jhmGgSzLw--.22965S8; Mon, 06 May 2024 22:18:25 +0800 (CST) From: Kemeng Shi To: tytso@mit.edu, jack@suse.com Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/9] jbd2: use bh_in instead of jh2bh(jh_in) to simplify code Date: Mon, 6 May 2024 22:17:58 +0800 Message-Id: <20240506141801.1165315-7-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20240506141801.1165315-1-shikemeng@huaweicloud.com> References: <20240506141801.1165315-1-shikemeng@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:cCh0CgAH2RGu5jhmGgSzLw--.22965S8 X-Coremail-Antispam: 1UD129KBjvdXoW7Xr1DuF1xCw4fGF1kCrW5GFg_yoWfCrc_Za ykAw1kZwsIyF4DJw4rCw4xXr1jgw1rAr1ku3Z7tFyDCFnIvrn3Z3ZIkrn2yrnrua1xtrW5 X3ZruF4FyFy7JjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbVkYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7IE14v26r126s 0DM28IrcIa0xkI8VCY1x0267AKxVW5JVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4AK67xG Y2AK021l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14 v26F4UJVW0owA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AK xVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ew Av7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY 6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r 1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CE b7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1I6r4UMIIF0x vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAI cVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2Kf nxnUUI43ZEXa7IU13l1DUUUUU== X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ We save jh2bh(jh_in) to bh_in, so use bh_in directly instead of jh2bh(jh_in) to simplify the code. Signed-off-by: Kemeng Shi --- fs/jbd2/journal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 87f558bd2e8a..01e33b643e4d 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -363,8 +363,8 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction, new_folio = virt_to_folio(jh_in->b_frozen_data); new_offset = offset_in_folio(new_folio, jh_in->b_frozen_data); } else { - new_folio = jh2bh(jh_in)->b_folio; - new_offset = offset_in_folio(new_folio, jh2bh(jh_in)->b_data); + new_folio = bh_in->b_folio; + new_offset = offset_in_folio(new_folio, bh_in->b_data); } mapped_data = kmap_local_folio(new_folio, new_offset); -- 2.30.0