Thread (15 messages) 15 messages, 7 authors, 2012-05-28

Re: [PATCH RESEND] ext4: change return value from int to ssize_t in ext4_file_write

From: Eric Sandeen <hidden>
Date: 2012-05-22 19:44:40

On 4/12/12 8:22 PM, Zheng Liu wrote:
On 64-platform, when we do a write operation with a huge number of data, it
will cause that the ret variable overflows.  So it is replaced with ssize_t.

Reported-by: Jouni Siren <redacted>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Zheng Liu <redacted>
Ted, is this one queued anywhere?  Seems lost so far.

Thanks,
-Eric
quoted hunk ↗ jump to hunk
---
Hi Jan,

You are right.  I have changed the commit log.  ;-)

Regards,
Zheng

 fs/ext4/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index cb70f18..8c7642a 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -95,7 +95,7 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
 {
 	struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
 	int unaligned_aio = 0;
-	int ret;
+	ssize_t ret;
 
 	/*
 	 * If we have encountered a bitmap-format file, the size limit
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help