summaryrefslogtreecommitdiffstats
path: root/fs/jbd/transaction.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-10-05 01:03:40 +0900
committerJan Kara <jack@suse.cz>2010-10-28 01:30:02 +0200
commit8117f98c058dbe463eaba2b51b84d19bd5d78804 (patch)
tree5388a8183faff48ac48105396d55fec255c93185 /fs/jbd/transaction.c
parent2b23976908d9f8406f8b10b86c83b2cee302bc7d (diff)
downloadlinux-8117f98c058dbe463eaba2b51b84d19bd5d78804.tar.bz2
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>
Diffstat (limited to 'fs/jbd/transaction.c')
-rw-r--r--fs/jbd/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index 981449ca8f18..c9bb7a73f8fd 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);