Commit a1dd53318409ed6a27a8ce4fecf52e1326a100c0
1 parent
cfef2c6a55
Exists in
master
and in
4 other branches
jbd2: use offset_in_page() instead of manual calculation
This is a port to jbd2 of a patch which Namhyung Kim <namhyung@gmail.com> originally made to fs/jbd. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
fs/jbd2/transaction.c
... | ... | @@ -774,7 +774,7 @@ |
774 | 774 | J_EXPECT_JH(jh, buffer_uptodate(jh2bh(jh)), |
775 | 775 | "Possible IO failure.\n"); |
776 | 776 | page = jh2bh(jh)->b_page; |
777 | - offset = ((unsigned long) jh2bh(jh)->b_data) & ~PAGE_MASK; | |
777 | + offset = offset_in_page(jh2bh(jh)->b_data); | |
778 | 778 | source = kmap_atomic(page, KM_USER0); |
779 | 779 | /* Fire data frozen trigger just before we copy the data */ |
780 | 780 | jbd2_buffer_frozen_trigger(jh, source + offset, |