Commit a1dd5331 authored by Theodore Ts'o's avatar Theodore Ts'o

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: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent cfef2c6a
...@@ -774,7 +774,7 @@ do_get_write_access(handle_t *handle, struct journal_head *jh, ...@@ -774,7 +774,7 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
J_EXPECT_JH(jh, buffer_uptodate(jh2bh(jh)), J_EXPECT_JH(jh, buffer_uptodate(jh2bh(jh)),
"Possible IO failure.\n"); "Possible IO failure.\n");
page = jh2bh(jh)->b_page; 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); source = kmap_atomic(page, KM_USER0);
/* Fire data frozen trigger just before we copy the data */ /* Fire data frozen trigger just before we copy the data */
jbd2_buffer_frozen_trigger(jh, source + offset, jbd2_buffer_frozen_trigger(jh, source + offset,
......
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