]> err.no Git - linux-2.6/commitdiff
eCryptfs: cast page->index to loff_t instead of off_t
authorMichael Halcrow <mhalcrow@us.ibm.com>
Thu, 15 Nov 2007 00:58:27 +0000 (16:58 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 15 Nov 2007 02:45:36 +0000 (18:45 -0800)
page->index should be cast to loff_t instead of off_t.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Reported-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ecryptfs/read_write.c

index 2150edf9a58e6db662adcb12bb9ae279ad306c2d..6b7474a4336a5844cd004d3b8af923f19d6fc536 100644 (file)
@@ -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);