Skip to content

Commit

Permalink
eCryptfs: cast page->index to loff_t instead of off_t
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Halcrow authored and Linus Torvalds committed Nov 15, 2007
1 parent 0fd4980 commit 8a146a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ecryptfs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8a146a2

Please sign in to comment.