From: Michael Halcrow Date: Thu, 15 Nov 2007 00:58:27 +0000 (-0800) Subject: eCryptfs: cast page->index to loff_t instead of off_t X-Git-Tag: v2.6.24-rc3~135 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a146a2b0d6e97941a5c2dc5d8a3ea1e6c3ab997;p=linux-2.6 eCryptfs: cast page->index to loff_t instead of off_t page->index should be cast to loff_t instead of off_t. Signed-off-by: Michael Halcrow Reported-by: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ecryptfs/read_write.c b/fs/ecryptfs/read_write.c index 2150edf9a5..6b7474a433 100644 --- a/fs/ecryptfs/read_write.c +++ b/fs/ecryptfs/read_write.c @@ -87,7 +87,7 @@ int ecryptfs_write_lower_page_segment(struct inode *ecryptfs_inode, loff_t offset; int rc; - offset = ((((off_t)page_for_lower->index) << PAGE_CACHE_SHIFT) + offset = ((((loff_t)page_for_lower->index) << PAGE_CACHE_SHIFT) + offset_in_page); virt = kmap(page_for_lower); rc = ecryptfs_write_lower(ecryptfs_inode, virt, offset, size);