Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291812
b: refs/heads/master
c: 303a8f2
h: refs/heads/master
v: v3
  • Loading branch information
Cong Wang authored and Cong Wang committed Mar 20, 2012
1 parent ff0c690 commit c1c981f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8fb53c46d9c9322fc5a8e53038ceb0d243059c25
refs/heads/master: 303a8f2afc7ba01083b50b7fceac2a412f28da4e
4 changes: 2 additions & 2 deletions trunk/fs/jbd2/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ static __u32 jbd2_checksum_data(__u32 crc32_sum, struct buffer_head *bh)
char *addr;
__u32 checksum;

addr = kmap_atomic(page, KM_USER0);
addr = kmap_atomic(page);
checksum = crc32_be(crc32_sum,
(void *)(addr + offset_in_page(bh->b_data)), bh->b_size);
kunmap_atomic(addr, KM_USER0);
kunmap_atomic(addr);

return checksum;
}
Expand Down
12 changes: 6 additions & 6 deletions trunk/fs/jbd2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
new_offset = offset_in_page(jh2bh(jh_in)->b_data);
}

mapped_data = kmap_atomic(new_page, KM_USER0);
mapped_data = kmap_atomic(new_page);
/*
* Fire data frozen trigger if data already wasn't frozen. Do this
* before checking for escaping, as the trigger may modify the magic
Expand All @@ -364,7 +364,7 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
need_copy_out = 1;
do_escape = 1;
}
kunmap_atomic(mapped_data, KM_USER0);
kunmap_atomic(mapped_data);

/*
* Do we need to do a data copy?
Expand All @@ -385,9 +385,9 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
}

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);
kunmap_atomic(mapped_data, KM_USER0);
kunmap_atomic(mapped_data);

new_page = virt_to_page(tmp);
new_offset = offset_in_page(tmp);
Expand All @@ -406,9 +406,9 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
* copying, we can finally do so.
*/
if (do_escape) {
mapped_data = kmap_atomic(new_page, KM_USER0);
mapped_data = kmap_atomic(new_page);
*((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);
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/jbd2/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,12 +783,12 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
"Possible IO failure.\n");
page = jh2bh(jh)->b_page;
offset = offset_in_page(jh2bh(jh)->b_data);
source = kmap_atomic(page, KM_USER0);
source = kmap_atomic(page);
/* Fire data frozen trigger just before we copy the data */
jbd2_buffer_frozen_trigger(jh, source + offset,
jh->b_triggers);
memcpy(jh->b_frozen_data, source+offset, jh2bh(jh)->b_size);
kunmap_atomic(source, KM_USER0);
kunmap_atomic(source);

/*
* Now that the frozen data is saved off, we need to store
Expand Down

0 comments on commit c1c981f

Please sign in to comment.