Skip to content

Commit daabedd

Browse files
Kemeng Shitytso
authored andcommitted
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 <[email protected]> Reviewed-by: Zhang Yi <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 4c15129 commit daabedd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/jbd2/journal.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,11 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
419419
/*
420420
* Did we need to do an escaping? Now we've done all the
421421
* copying, we can finally do so.
422+
* b_frozen_data is from jbd2_alloc() which always provides an
423+
* address from the direct kernels mapping.
422424
*/
423-
if (do_escape) {
424-
mapped_data = kmap_local_folio(new_folio, new_offset);
425-
*((unsigned int *)mapped_data) = 0;
426-
kunmap_local(mapped_data);
427-
}
425+
if (do_escape)
426+
*((unsigned int *)jh_in->b_frozen_data) = 0;
428427

429428
folio_set_bh(new_bh, new_folio, new_offset);
430429
new_bh->b_size = bh_in->b_size;

0 commit comments

Comments
 (0)