Re: [patch 17/19] Use page_cache_xxx in fs/reiserfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux