On Wed, Nov 28, 2007 at 05:11:09PM -0800, Christoph Lameter wrote:
> @@ -2000,11 +2001,13 @@ static int grab_tail_page(struct inode *
> /* we want the page with the last byte in the file,
> ** not the page that will hold the next byte for appending
> */
> - unsigned long index = (p_s_inode->i_size - 1) >> PAGE_CACHE_SHIFT;
> + unsigned long index = page_cache_index(p_s_inode->i_mapping,
> + p_s_inode->i_size - 1);
> unsigned long pos = 0;
> unsigned long start = 0;
> unsigned long blocksize = p_s_inode->i_sb->s_blocksize;
> - unsigned long offset = (p_s_inode->i_size) & (PAGE_CACHE_SIZE - 1);
> + unsigned long offset = page_cache_index(p_s_inode->i_mapping,
> + p_s_inode->i_size);
unsigned long offset = page_cache_offset(p_s_inode->i_mapping,
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 [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html