diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/inode.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 0c94db462c2f..8d9707746413 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -1311,10 +1311,11 @@ static int ext4_ordered_write_end(struct file *file, | |||
1311 | new_i_size = pos + copied; | 1311 | new_i_size = pos + copied; |
1312 | if (new_i_size > EXT4_I(inode)->i_disksize) | 1312 | if (new_i_size > EXT4_I(inode)->i_disksize) |
1313 | EXT4_I(inode)->i_disksize = new_i_size; | 1313 | EXT4_I(inode)->i_disksize = new_i_size; |
1314 | copied = ext4_generic_write_end(file, mapping, pos, len, copied, | 1314 | ret2 = ext4_generic_write_end(file, mapping, pos, len, copied, |
1315 | page, fsdata); | 1315 | page, fsdata); |
1316 | if (copied < 0) | 1316 | copied = ret2; |
1317 | ret = copied; | 1317 | if (ret2 < 0) |
1318 | ret = ret2; | ||
1318 | } | 1319 | } |
1319 | ret2 = ext4_journal_stop(handle); | 1320 | ret2 = ext4_journal_stop(handle); |
1320 | if (!ret) | 1321 | if (!ret) |
@@ -1339,10 +1340,11 @@ static int ext4_writeback_write_end(struct file *file, | |||
1339 | if (new_i_size > EXT4_I(inode)->i_disksize) | 1340 | if (new_i_size > EXT4_I(inode)->i_disksize) |
1340 | EXT4_I(inode)->i_disksize = new_i_size; | 1341 | EXT4_I(inode)->i_disksize = new_i_size; |
1341 | 1342 | ||
1342 | copied = ext4_generic_write_end(file, mapping, pos, len, copied, | 1343 | ret2 = ext4_generic_write_end(file, mapping, pos, len, copied, |
1343 | page, fsdata); | 1344 | page, fsdata); |
1344 | if (copied < 0) | 1345 | copied = ret2; |
1345 | ret = copied; | 1346 | if (ret2 < 0) |
1347 | ret = ret2; | ||
1346 | 1348 | ||
1347 | ret2 = ext4_journal_stop(handle); | 1349 | ret2 = ext4_journal_stop(handle); |
1348 | if (!ret) | 1350 | if (!ret) |