aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2011-11-25 10:14:31 -0500
committerCong Wang <xiyou.wangcong@gmail.com>2012-03-20 09:48:23 -0400
commit303a8f2afc7ba01083b50b7fceac2a412f28da4e (patch)
tree6c38724e820d2458fb8480b10e0a78ba52d11075 /fs/jbd2
parent8fb53c46d9c9322fc5a8e53038ceb0d243059c25 (diff)
jbd2: remove the second argument of k[un]map_atomic()
Signed-off-by: Cong Wang <amwang@redhat.com>
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/commit.c4
-rw-r--r--fs/jbd2/journal.c12
-rw-r--r--fs/jbd2/transaction.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 5069b8475150..c067a8cae63b 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -286,10 +286,10 @@ static __u32 jbd2_checksum_data(__u32 crc32_sum, struct buffer_head *bh)
286 char *addr; 286 char *addr;
287 __u32 checksum; 287 __u32 checksum;
288 288
289 addr = kmap_atomic(page, KM_USER0); 289 addr = kmap_atomic(page);
290 checksum = crc32_be(crc32_sum, 290 checksum = crc32_be(crc32_sum,
291 (void *)(addr + offset_in_page(bh->b_data)), bh->b_size); 291 (void *)(addr + offset_in_page(bh->b_data)), bh->b_size);
292 kunmap_atomic(addr, KM_USER0); 292 kunmap_atomic(addr);
293 293
294 return checksum; 294 return checksum;
295} 295}
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index c0a5f9f1b127..5ff8940b8f02 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -345,7 +345,7 @@ repeat:
345 new_offset = offset_in_page(jh2bh(jh_in)->b_data); 345 new_offset = offset_in_page(jh2bh(jh_in)->b_data);
346 } 346 }
347 347
348 mapped_data = kmap_atomic(new_page, KM_USER0); 348 mapped_data = kmap_atomic(new_page);
349 /* 349 /*
350 * Fire data frozen trigger if data already wasn't frozen. Do this 350 * Fire data frozen trigger if data already wasn't frozen. Do this
351 * before checking for escaping, as the trigger may modify the magic 351 * before checking for escaping, as the trigger may modify the magic
@@ -364,7 +364,7 @@ repeat:
364 need_copy_out = 1; 364 need_copy_out = 1;
365 do_escape = 1; 365 do_escape = 1;
366 } 366 }
367 kunmap_atomic(mapped_data, KM_USER0); 367 kunmap_atomic(mapped_data);
368 368
369 /* 369 /*
370 * Do we need to do a data copy? 370 * Do we need to do a data copy?
@@ -385,9 +385,9 @@ repeat:
385 } 385 }
386 386
387 jh_in->b_frozen_data = tmp; 387 jh_in->b_frozen_data = tmp;
388 mapped_data = kmap_atomic(new_page, KM_USER0); 388 mapped_data = kmap_atomic(new_page);
389 memcpy(tmp, mapped_data + new_offset, jh2bh(jh_in)->b_size); 389 memcpy(tmp, mapped_data + new_offset, jh2bh(jh_in)->b_size);
390 kunmap_atomic(mapped_data, KM_USER0); 390 kunmap_atomic(mapped_data);
391 391
392 new_page = virt_to_page(tmp); 392 new_page = virt_to_page(tmp);
393 new_offset = offset_in_page(tmp); 393 new_offset = offset_in_page(tmp);
@@ -406,9 +406,9 @@ repeat:
406 * copying, we can finally do so. 406 * copying, we can finally do so.
407 */ 407 */
408 if (do_escape) { 408 if (do_escape) {
409 mapped_data = kmap_atomic(new_page, KM_USER0); 409 mapped_data = kmap_atomic(new_page);
410 *((unsigned int *)(mapped_data + new_offset)) = 0; 410 *((unsigned int *)(mapped_data + new_offset)) = 0;
411 kunmap_atomic(mapped_data, KM_USER0); 411 kunmap_atomic(mapped_data);
412 } 412 }
413 413
414 set_bh_page(new_bh, new_page, new_offset); 414 set_bh_page(new_bh, new_page, new_offset);
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 35ae096bed5d..e5aba56e1fd5 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -783,12 +783,12 @@ done:
783 "Possible IO failure.\n"); 783 "Possible IO failure.\n");
784 page = jh2bh(jh)->b_page; 784 page = jh2bh(jh)->b_page;
785 offset = offset_in_page(jh2bh(jh)->b_data); 785 offset = offset_in_page(jh2bh(jh)->b_data);
786 source = kmap_atomic(page, KM_USER0); 786 source = kmap_atomic(page);
787 /* Fire data frozen trigger just before we copy the data */ 787 /* Fire data frozen trigger just before we copy the data */
788 jbd2_buffer_frozen_trigger(jh, source + offset, 788 jbd2_buffer_frozen_trigger(jh, source + offset,
789 jh->b_triggers); 789 jh->b_triggers);
790 memcpy(jh->b_frozen_data, source+offset, jh2bh(jh)->b_size); 790 memcpy(jh->b_frozen_data, source+offset, jh2bh(jh)->b_size);
791 kunmap_atomic(source, KM_USER0); 791 kunmap_atomic(source);
792 792
793 /* 793 /*
794 * Now that the frozen data is saved off, we need to store 794 * Now that the frozen data is saved off, we need to store