From: Edward Shishkin Date: Fri, 29 Oct 2010 22:11:50 +0000 (+0200) Subject: ecryptfs: fix truncation error in ecryptfs_read_update_atime X-Git-Tag: v3.0~2045^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38a708d7759476318d0eec64af174513032ec67a;p=platform%2Fkernel%2Flinux-amlogic.git 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. Signed-off-by: Edward Shishkin Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Eric Sandeen Signed-off-by: Tyler Hicks --- diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index 91da029..679817e 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c @@ -47,7 +47,7 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb, 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;