Commit daabedd6 authored by Kemeng Shi's avatar Kemeng Shi Committed by Theodore Ts'o

jbd2: remove unneeded kmap to do escape in jbd2_journal_write_metadata_buffer

The data to do escape could be accessed directly from b_frozen_data,
just remove unneeded kmap.
Signed-off-by: default avatarKemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20240514112438.1269037-6-shikemeng@huaweicloud.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 4c15129a
......@@ -419,12 +419,11 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
/*
* Did we need to do an escaping? Now we've done all the
* copying, we can finally do so.
* b_frozen_data is from jbd2_alloc() which always provides an
* address from the direct kernels mapping.
*/
if (do_escape) {
mapped_data = kmap_local_folio(new_folio, new_offset);
*((unsigned int *)mapped_data) = 0;
kunmap_local(mapped_data);
}
if (do_escape)
*((unsigned int *)jh_in->b_frozen_data) = 0;
folio_set_bh(new_bh, new_folio, new_offset);
new_bh->b_size = bh_in->b_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment