From 8117f98c058dbe463eaba2b51b84d19bd5d78804 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Tue, 5 Oct 2010 01:03:40 +0900 Subject: jbd: Use offset_in_page() instead of manual calculation Signed-off-by: Namhyung Kim Signed-off-by: Jan Kara --- fs/jbd/transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 981449ca8f1..c9bb7a73f8f 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -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); -- cgit v1.2.3