On Wed, Nov 28, 2007 at 05:11:08PM -0800, Christoph Lameter wrote: > @@ -1677,6 +1676,7 @@ static int ext4_journalled_writepage(str > handle_t *handle = NULL; > int ret = 0; > int err; > + int pagesize = page_cache_size(inode->i_mapping); > > if (ext4_journal_current_handle()) > goto no_write; > @@ -1693,17 +1693,17 @@ static int ext4_journalled_writepage(str > * doesn't seem much point in redirtying the page here. > */ > ClearPageChecked(page); > - ret = block_prepare_write(page, 0, PAGE_CACHE_SIZE, > + ret = block_prepare_write(page, 0, page_cache_size(mapping), > ext4_get_block); > if (ret != 0) { > ext4_journal_stop(handle); > goto out_unlock; > } > ret = walk_page_buffers(handle, page_buffers(page), 0, > - PAGE_CACHE_SIZE, NULL, do_journal_get_write_access); > + page_cache_size(mapping), NULL, do_journal_get_write_access); > > err = walk_page_buffers(handle, page_buffers(page), 0, > - PAGE_CACHE_SIZE, NULL, write_end_fn); > + page_cache_size(mapping), NULL, write_end_fn); These three should use the pagesize variable. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html