* [PATCH] ecryptfs: fix truncation error in ecryptfs_read_update_atime
@ 2010-10-29 22:11 Edward Shishkin
0 siblings, 0 replies; only message in thread
From: Edward Shishkin @ 2010-10-29 22:11 UTC (permalink / raw)
To: Andrew Morton; +Cc: jmoyer, hch, esandeen, linux-fsdevel, linux-kernel
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>
---
fs/ecryptfs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.36.orig/fs/ecryptfs/file.c
+++ linux-2.6.36/fs/ecryptfs/file.c
@@ -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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-29 22:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-29 22:11 [PATCH] ecryptfs: fix truncation error in ecryptfs_read_update_atime Edward Shishkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).