Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp509317lqh; Tue, 7 May 2024 06:15:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/fE7cObxbDYiuSNyKkjHaaI2iIQwulrpzJO9V3lKaYYWdb4DpUAHh8pEISzEp56dUeVqebdVTQbDFFSVYw9QVwKTM/t6xw269yvs8jA== X-Google-Smtp-Source: AGHT+IF6oqErqm69CUPKBFPTNGrAY57UBFLwqvQtL3yCV/E81jcnfsFssWtJy1abEk3jCMPB+dDm X-Received: by 2002:a05:6358:418e:b0:192:2e43:9285 with SMTP id w14-20020a056358418e00b001922e439285mr4205500rwc.13.1715087741933; Tue, 07 May 2024 06:15:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715087741; cv=pass; d=google.com; s=arc-20160816; b=mNA+yk990d9P/b6hC0rUT4fqkv+fHNibqUcHrdSj3t2WRajcZd1SY+iOU9tBWpS50i zAAGO9wXuXfmcZFZNMCORCQ4JbFXHlcA5o+yKmRKHBEZL4NFVBMw6Ieb2tlMwppzq5eP 4IBq1ooA9kjeDRC6GwjzHg9kyi0Hk8r63J+Wnt/83fudpd5cXtFOQjrfFOAKbJTD67B4 pQ26mXWEYrH/J3Jp+w8bwTloIsatyf9B5HrPIReWAWsvG3ufQYHGOPo6WlwU8W6CuLxg ECjrarhDmgkc5rBtHBCrBAz4BLnh91N0G98VJnBwBg5v+q5eo4tHr59zurFewLGxzZx1 NdXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject; bh=QqsvQQvbC6YyJdB0/RA78n3n4dbofzQVKY2HfMUFbCM=; fh=IHwpFdCa9h5mWiv416SeMULvVNmmO3J3/GUfiAeUsVg=; b=IzK+2KUeUPBFkHGXkZbSFhud9ZEfljOweq2dYZTfNDlXs7hAs8E1sCB6P47LzKprUZ osOuu+DxAUAmqODUW3mNTJcc++YlgbhqB2QSfcdrkEA8obIH1KeHu2KH5tFWKk+XLHJH YUTOhoWNEdWsWDqD37keLh4mqQ/NleRN5tRTX0FYmLx6DGw3mntKfFjXwYjuI7LAUnpd FszWMp8vB2awkKLgs6xY0123XpyD7cyOpGcfwEy+KS3SirMfhMP6e+Lnmzy3o7nv7Jf7 7ZQ6ORthCSE6YFw7F3D5thuIgjgGrd0A5MpSr8eRul733O2D7GWg+BIjGpPs8K6Y40W+ CTwA==; 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-2345-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2345-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f4-20020a654004000000b005dc528a5317si10514664pgp.50.2024.05.07.06.15.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 06:15:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2345-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-ext4+bounces-2345-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2345-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 37966282757 for ; Tue, 7 May 2024 13:15:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B26D915ECC6; Tue, 7 May 2024 13:13:36 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout12.his.huawei.com (unknown [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 5807215E5D2; Tue, 7 May 2024 13:13:33 +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=1715087616; cv=none; b=mmiDWBKWfc1RgFB9nOMbaarNFYCxv2xFutmSlSgI19eQ/A++yQ6SyLthAOdFU4qLxg6ouKdlSLwFGRumqo4OGfrHxt3l+zzhmpzaEEwYJhPDNKpbjqJVkGrxL/zdV4YMkzWEB9nqlM1J5uLUwqWLC99S0hv10FZUwy1yXXKFAJQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715087616; c=relaxed/simple; bh=nXTXydUjZ0AYCUSfBjFdB1M0Cpdjkm6cUoTgReWw5So=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=lddK7dzNr1VQz8w+P6YDvHuIr4OKrApFWkmbJdaeaNxL0l1aytFBHMPZ1rjDeHyOod0NaU6+PZ5CbRdtJQ9gxxwI3/UqxdNtSiJoV18wsAQbGykFw9FOY5tK1B2rBP62CFM/kqNtAU8D8kregBCxx7CQeWe/8s6rmCmIQGyPtaA= 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 4VYdxt4t88z4f3kG1; Tue, 7 May 2024 21:13:22 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.75]) by mail.maildlp.com (Postfix) with ESMTP id E64221A0568; Tue, 7 May 2024 21:13:30 +0800 (CST) Received: from [10.174.179.80] (unknown [10.174.179.80]) by APP2 (Coremail) with SMTP id Syh0CgCnyw76KDpmLTcxMQ--.42256S3; Tue, 07 May 2024 21:13:30 +0800 (CST) Subject: Re: [PATCH 6/9] jbd2: use bh_in instead of jh2bh(jh_in) to simplify code To: Kemeng Shi Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, tytso@mit.edu, jack@suse.com References: <20240506141801.1165315-1-shikemeng@huaweicloud.com> <20240506141801.1165315-7-shikemeng@huaweicloud.com> From: Zhang Yi Message-ID: Date: Tue, 7 May 2024 21:13:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240506141801.1165315-7-shikemeng@huaweicloud.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CM-TRANSID:Syh0CgCnyw76KDpmLTcxMQ--.42256S3 X-Coremail-Antispam: 1UD129KBjvdXoW7Xr1kGw13XFW8Gw43Zr4UCFg_yoWDCrg_Za yvyw1kX39IqF4kJw4rCw1xWr4Ygw1rZr1kCw1xtFyUuFnIvFn5Z3Z8KrWvyrnrWa1xKrW5 Z3Z7uF4FyasrXjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbzAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwV A0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x02 67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I 0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40E x7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x 0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzVAYIcxG8wCF04k20xvY0x0E wIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04 k26cxKx2IYs7xG6Fyj6rWUJwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF 7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUrNtxDUUUU X-CM-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ On 2024/5/6 22:17, Kemeng Shi wrote: > 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 Looks good to me. Reviewed-by: Zhang Yi > --- > 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); >