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: MMI-PSA29.97-13-9~20987^2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=38a708d7759476318d0eec64af174513032ec67a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.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 91da02987bff..679817e82484 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;