]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ecryptfs: fix truncation error in ecryptfs_read_update_atime
authorEdward Shishkin <edward.shishkin@gmail.com>
Fri, 29 Oct 2010 22:11:50 +0000 (00:11 +0200)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Mon, 17 Jan 2011 16:44:30 +0000 (10:44 -0600)
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 <edward.shishkin@gmail.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Eric Sandeen <esandeen@redhat.com>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
fs/ecryptfs/file.c

index 91da02987bffef3aa07638d9dd9a8587a7b5a5b2..679817e82484e1fd2964a07730b110c4e79c6100 100644 (file)
@@ -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;