Commit 8fb53c46 authored by Cong Wang's avatar Cong Wang Committed by Cong Wang

jbd: remove the second argument of k[un]map_atomic()

Acked-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarCong Wang <amwang@redhat.com>
parent d9349285
...@@ -328,7 +328,7 @@ int journal_write_metadata_buffer(transaction_t *transaction, ...@@ -328,7 +328,7 @@ int journal_write_metadata_buffer(transaction_t *transaction,
new_offset = offset_in_page(jh2bh(jh_in)->b_data); new_offset = offset_in_page(jh2bh(jh_in)->b_data);
} }
mapped_data = kmap_atomic(new_page, KM_USER0); mapped_data = kmap_atomic(new_page);
/* /*
* Check for escaping * Check for escaping
*/ */
...@@ -337,7 +337,7 @@ int journal_write_metadata_buffer(transaction_t *transaction, ...@@ -337,7 +337,7 @@ int journal_write_metadata_buffer(transaction_t *transaction,
need_copy_out = 1; need_copy_out = 1;
do_escape = 1; do_escape = 1;
} }
kunmap_atomic(mapped_data, KM_USER0); kunmap_atomic(mapped_data);
/* /*
* Do we need to do a data copy? * Do we need to do a data copy?
...@@ -354,9 +354,9 @@ int journal_write_metadata_buffer(transaction_t *transaction, ...@@ -354,9 +354,9 @@ int journal_write_metadata_buffer(transaction_t *transaction,
} }
jh_in->b_frozen_data = tmp; jh_in->b_frozen_data = tmp;
mapped_data = kmap_atomic(new_page, KM_USER0); mapped_data = kmap_atomic(new_page);
memcpy(tmp, mapped_data + new_offset, jh2bh(jh_in)->b_size); memcpy(tmp, mapped_data + new_offset, jh2bh(jh_in)->b_size);
kunmap_atomic(mapped_data, KM_USER0); kunmap_atomic(mapped_data);
new_page = virt_to_page(tmp); new_page = virt_to_page(tmp);
new_offset = offset_in_page(tmp); new_offset = offset_in_page(tmp);
...@@ -368,9 +368,9 @@ int journal_write_metadata_buffer(transaction_t *transaction, ...@@ -368,9 +368,9 @@ int journal_write_metadata_buffer(transaction_t *transaction,
* copying, we can finally do so. * copying, we can finally do so.
*/ */
if (do_escape) { if (do_escape) {
mapped_data = kmap_atomic(new_page, KM_USER0); mapped_data = kmap_atomic(new_page);
*((unsigned int *)(mapped_data + new_offset)) = 0; *((unsigned int *)(mapped_data + new_offset)) = 0;
kunmap_atomic(mapped_data, KM_USER0); kunmap_atomic(mapped_data);
} }
set_bh_page(new_bh, new_page, new_offset); set_bh_page(new_bh, new_page, new_offset);
......
...@@ -718,9 +718,9 @@ do_get_write_access(handle_t *handle, struct journal_head *jh, ...@@ -718,9 +718,9 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
"Possible IO failure.\n"); "Possible IO failure.\n");
page = jh2bh(jh)->b_page; page = jh2bh(jh)->b_page;
offset = offset_in_page(jh2bh(jh)->b_data); offset = offset_in_page(jh2bh(jh)->b_data);
source = kmap_atomic(page, KM_USER0); source = kmap_atomic(page);
memcpy(jh->b_frozen_data, source+offset, jh2bh(jh)->b_size); memcpy(jh->b_frozen_data, source+offset, jh2bh(jh)->b_size);
kunmap_atomic(source, KM_USER0); kunmap_atomic(source);
} }
jbd_unlock_bh_state(bh); jbd_unlock_bh_state(bh);
......
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