diff options
author | Roel Kluin <12o3l@tiscali.nl> | 2008-04-29 22:01:27 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-04-29 22:01:27 -0400 |
commit | 7c2f3d6f89aab04c5c66a0a757888d3a77a5e899 (patch) | |
tree | bf88a76e882892657b032bd131d9ab43592a055f /fs/ext3 | |
parent | 8f6e39a7ade8a5329c5651a2bc07010b3011da6a (diff) | |
download | linux-3.10-7c2f3d6f89aab04c5c66a0a757888d3a77a5e899.tar.gz linux-3.10-7c2f3d6f89aab04c5c66a0a757888d3a77a5e899.tar.bz2 linux-3.10-7c2f3d6f89aab04c5c66a0a757888d3a77a5e899.zip |
ext3: fix test ext_generic_write_end() copied return value
'copied' is unsigned, whereas 'ret2' is not. The test (copied < 0) fails
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/inode.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index cc47b76091b..6ae4ecf3ce4 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -1261,10 +1261,11 @@ static int ext3_ordered_write_end(struct file *file, new_i_size = pos + copied; if (new_i_size > EXT3_I(inode)->i_disksize) EXT3_I(inode)->i_disksize = new_i_size; - copied = ext3_generic_write_end(file, mapping, pos, len, copied, + ret2 = ext3_generic_write_end(file, mapping, pos, len, copied, page, fsdata); - if (copied < 0) - ret = copied; + copied = ret2; + if (ret2 < 0) + ret = ret2; } ret2 = ext3_journal_stop(handle); if (!ret) @@ -1289,10 +1290,11 @@ static int ext3_writeback_write_end(struct file *file, if (new_i_size > EXT3_I(inode)->i_disksize) EXT3_I(inode)->i_disksize = new_i_size; - copied = ext3_generic_write_end(file, mapping, pos, len, copied, + ret2 = ext3_generic_write_end(file, mapping, pos, len, copied, page, fsdata); - if (copied < 0) - ret = copied; + copied = ret2; + if (ret2 < 0) + ret = ret2; ret2 = ext3_journal_stop(handle); if (!ret) |