]> www.infradead.org Git - linux.git/commitdiff
jbd2: use bh_in instead of jh2bh(jh_in) to simplify code
authorKemeng Shi <shikemeng@huaweicloud.com>
Tue, 14 May 2024 11:24:35 +0000 (19:24 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 27 Jun 2024 14:20:26 +0000 (10:20 -0400)
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 <shikemeng@huaweicloud.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20240514112438.1269037-7-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/journal.c

index d69f8e0a12e0f94c2faa8ad0acf2eca08663a024..1ea96ab9374a7fd8e1e68dcfe09388aa1b7907f8 100644 (file)
@@ -360,8 +360,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);