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 | |
parent | 8f6e39a7ade8a5329c5651a2bc07010b3011da6a (diff) |
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')
-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 cc47b76091bf..6ae4ecf3ce40 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -1261,10 +1261,11 @@ static int ext3_ordered_write_end(struct file *file, | |||
1261 | new_i_size = pos + copied; | 1261 | new_i_size = pos + copied; |
1262 | if (new_i_size > EXT3_I(inode)->i_disksize) | 1262 | if (new_i_size > EXT3_I(inode)->i_disksize) |
1263 | EXT3_I(inode)->i_disksize = new_i_size; | 1263 | EXT3_I(inode)->i_disksize = new_i_size; |
1264 | copied = ext3_generic_write_end(file, mapping, pos, len, copied, | 1264 | ret2 = ext3_generic_write_end(file, mapping, pos, len, copied, |
1265 | page, fsdata); | 1265 | page, fsdata); |
1266 | if (copied < 0) | 1266 | copied = ret2; |
1267 | ret = copied; | 1267 | if (ret2 < 0) |
1268 | ret = ret2; | ||
1268 | } | 1269 | } |
1269 | ret2 = ext3_journal_stop(handle); | 1270 | ret2 = ext3_journal_stop(handle); |
1270 | if (!ret) | 1271 | if (!ret) |
@@ -1289,10 +1290,11 @@ static int ext3_writeback_write_end(struct file *file, | |||
1289 | if (new_i_size > EXT3_I(inode)->i_disksize) | 1290 | if (new_i_size > EXT3_I(inode)->i_disksize) |
1290 | EXT3_I(inode)->i_disksize = new_i_size; | 1291 | EXT3_I(inode)->i_disksize = new_i_size; |
1291 | 1292 | ||
1292 | copied = ext3_generic_write_end(file, mapping, pos, len, copied, | 1293 | ret2 = ext3_generic_write_end(file, mapping, pos, len, copied, |
1293 | page, fsdata); | 1294 | page, fsdata); |
1294 | if (copied < 0) | 1295 | copied = ret2; |
1295 | ret = copied; | 1296 | if (ret2 < 0) |
1297 | ret = ret2; | ||
1296 | 1298 | ||
1297 | ret2 = ext3_journal_stop(handle); | 1299 | ret2 = ext3_journal_stop(handle); |
1298 | if (!ret) | 1300 | if (!ret) |