mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
jbd: Use offset_in_page() instead of manual calculation
Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
2b23976908
commit
8117f98c05
@ -711,7 +711,7 @@ done:
|
||||
J_EXPECT_JH(jh, buffer_uptodate(jh2bh(jh)),
|
||||
"Possible IO failure.\n");
|
||||
page = jh2bh(jh)->b_page;
|
||||
offset = ((unsigned long) jh2bh(jh)->b_data) & ~PAGE_MASK;
|
||||
offset = offset_in_page(jh2bh(jh)->b_data);
|
||||
source = kmap_atomic(page, KM_USER0);
|
||||
memcpy(jh->b_frozen_data, source+offset, jh2bh(jh)->b_size);
|
||||
kunmap_atomic(source, KM_USER0);
|
||||
|
Loading…
Reference in New Issue
Block a user