* [PATCH] jbd: Use offset_in_page() instead of manual calculation
@ 2010-10-04 16:03 Namhyung Kim
2010-10-05 8:34 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Namhyung Kim @ 2010-10-04 16:03 UTC (permalink / raw)
To: Andrew Morton, Jan Kara; +Cc: linux-ext4, linux-kernel
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
fs/jbd/transaction.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index 981449c..c9bb7a7 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);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] jbd: Use offset_in_page() instead of manual calculation
2010-10-04 16:03 [PATCH] jbd: Use offset_in_page() instead of manual calculation Namhyung Kim
@ 2010-10-05 8:34 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2010-10-05 8:34 UTC (permalink / raw)
To: Namhyung Kim; +Cc: Andrew Morton, Jan Kara, linux-ext4, linux-kernel
On Tue 05-10-10 01:03:40, Namhyung Kim wrote:
> Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Thanks. Merged.
Honza
> ---
> fs/jbd/transaction.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
> index 981449c..c9bb7a7 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);
> --
> 1.7.0.4
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-05 8:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-04 16:03 [PATCH] jbd: Use offset_in_page() instead of manual calculation Namhyung Kim
2010-10-05 8:34 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox