diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 981449ca8f18a7fd6aa2101ff3e88a04ca64b9ca..c9bb7a73f8fdcff9d8ecf6f7e47683e3ec0bdff7 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -711,7 +711,7 @@ do_get_write_access(handle_t *handle, struct journal_head *jh, 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);