Re: [PATCH] jbd: Use offset_in_page() instead of manual calculation
From: Jan Kara
Date: Tue Oct 05 2010 - 04:35:09 EST
On Tue 05-10-10 01:03:40, Namhyung Kim wrote:
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx>
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@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/