diff options
author | Kemeng Shi <shikemeng@huaweicloud.com> | 2024-05-14 19:24:34 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2024-06-27 10:20:26 -0400 |
commit | daabedd664021afa9e7e3225489888a4fee99bad (patch) | |
tree | 3160523f362b001e0d1c33a85abed4fe3642b9ed /fs/jbd2 | |
parent | 4c15129aaad54af2df4665ddde9245788ee9fa9c (diff) |
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: 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-6-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
-rw-r--r-- | fs/jbd2/journal.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 739802000739..d69f8e0a12e0 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -419,12 +419,11 @@ copy_done: /* * 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; |