Skip to contentSkip to conversation

ecryptfs: fix truncation error in ecryptfs_read_update_atime

PATCH New Edward Shishkin 1 participant 1 message Oct 29, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ecryptfs: fix truncation error in ecryptfs_read_update_atime

This is similar to the bug found in direct-io not so long ago.

Fix up truncation (ssize_t->int). This only matters with >2G reads/writes, which the kernel doesn't permit.

---
 fs/ecryptfs/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ecryptfs/file.c +1 -1
@@ -48,7 +48,7 @@ static ssize_t ecryptfs_read_update_atim
 				const struct iovec *iov,
 				unsigned long nr_segs, loff_t pos)
 {
-	int rc;
+	ssize_t rc;
 	struct dentry *lower_dentry;
 	struct vfsmount *lower_vfsmount;
 	struct file *file = iocb->ki_filp;