summaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-12-18 13:13:40 -0500
committerTheodore Ts'o <tytso@mit.edu>2010-12-18 13:13:40 -0500
commita1dd53318409ed6a27a8ce4fecf52e1326a100c0 (patch)
tree38befc96ddbd6bb1aaeea3063ba47bc19dab09d9 /fs/jbd2
parentcfef2c6a559b1e37cbc7e7c1b51f82d26abf24ec (diff)
downloadlinux-stable-a1dd53318409ed6a27a8ce4fecf52e1326a100c0.tar.gz
linux-stable-a1dd53318409ed6a27a8ce4fecf52e1326a100c0.tar.bz2
linux-stable-a1dd53318409ed6a27a8ce4fecf52e1326a100c0.zip
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>
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 10b5e3b1ca8b..80f9b2a3880b 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -774,7 +774,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);
/* Fire data frozen trigger just before we copy the data */
jbd2_buffer_frozen_trigger(jh, source + offset,