Skip to contentSkip to conversation

eCryptfs: Cast page->index to loff_t instead of off_t

PATCH New Michael Halcrow 1 participant 1 message Nov 2, 2007 Ecrypt file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eCryptfs: Cast page->index to loff_t instead of off_t

page->index should be cast to loff_t instead of off_t.

---
 fs/ecryptfs/read_write.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ecryptfs/read_write.c +1 -1
index 2150edf..6b7474a 100644
@@ -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);
Signature · 1 line
1.5.1.6