Re: writepage fs corruption fixes
From: Andrea Arcangeli
Date: Fri Jul 09 2004 - 20:09:08 EST
On Sat, Jul 10, 2004 at 02:16:00AM +0200, Andrea Arcangeli wrote:
> I hope this time I'm done with it.
I'm not after more thinking it seems the below is not a bug.
I'm lost since I can't find bugs anymore in this function but I need to
find something.
>
> --- sles/fs/mpage.c.~1~ 2004-07-09 23:48:33.233205496 +0200
> +++ sles/fs/mpage.c 2004-07-10 02:11:59.922789800 +0200
> @@ -460,7 +460,7 @@ mpage_writepage(struct bio *bio, struct
> */
> BUG_ON(!PageUptodate(page));
> block_in_file = page->index << (PAGE_CACHE_SHIFT - blkbits);
> - last_block = (i_size_read(inode) - 1) >> blkbits;
> + last_block = (i_size_read(inode) + (1 << blkbits) - 1) >> blkbits;
> map_bh.b_page = page;
> for (page_block = 0; page_block < blocks_per_page; ) {
>
-
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/