From: Chris Mason For reiserfs, when block size is less then the page size, make sure to copy from the correct spot in the page. Before, it was always copying one file block starting from offset zero in the page, even when the buffer we wanted started later. This leads to corruptions after a crash on ia64 and other times when block size < page size. Signed-off-by: Andrew Morton --- 25-akpm/fs/reiserfs/journal.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN fs/reiserfs/journal.c~reiserfs-v3-logging-bug-for-blocksize-page-size fs/reiserfs/journal.c --- 25/fs/reiserfs/journal.c~reiserfs-v3-logging-bug-for-blocksize-page-size Thu Jun 10 13:53:13 2004 +++ 25-akpm/fs/reiserfs/journal.c Thu Jun 10 13:53:13 2004 @@ -3566,7 +3566,8 @@ static int do_journal_end(struct reiserf set_buffer_uptodate(tmp_bh); page = cn->bh->b_page; addr = kmap(page); - memcpy(tmp_bh->b_data, addr, cn->bh->b_size) ; + memcpy(tmp_bh->b_data, addr + offset_in_page(cn->bh->b_data), + cn->bh->b_size); kunmap(page); mark_buffer_dirty(tmp_bh); jindex++ ; _