aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/file.c')
-rw-r--r--fs/reiserfs/file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c
index be12879bb179..d0c1e865963e 100644
--- a/fs/reiserfs/file.c
+++ b/fs/reiserfs/file.c
@@ -1532,7 +1532,7 @@ static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t
1532 buf += write_bytes; 1532 buf += write_bytes;
1533 *ppos = pos += write_bytes; 1533 *ppos = pos += write_bytes;
1534 count -= write_bytes; 1534 count -= write_bytes;
1535 balance_dirty_pages_ratelimited(inode->i_mapping); 1535 balance_dirty_pages_ratelimited_nr(inode->i_mapping, num_pages);
1536 } 1536 }
1537 1537
1538 /* this is only true on error */ 1538 /* this is only true on error */
@@ -1546,10 +1546,10 @@ static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t
1546 } 1546 }
1547 } 1547 }
1548 1548
1549 if ((file->f_flags & O_SYNC) || IS_SYNC(inode)) 1549 if (likely(res >= 0) &&
1550 res = 1550 (unlikely((file->f_flags & O_SYNC) || IS_SYNC(inode))))
1551 generic_osync_inode(inode, file->f_mapping, 1551 res = generic_osync_inode(inode, file->f_mapping,
1552 OSYNC_METADATA | OSYNC_DATA); 1552 OSYNC_METADATA | OSYNC_DATA);
1553 1553
1554 mutex_unlock(&inode->i_mutex); 1554 mutex_unlock(&inode->i_mutex);
1555 reiserfs_async_progress_wait(inode->i_sb); 1555 reiserfs_async_progress_wait(inode->i_sb);