diff options
-rw-r--r-- | fs/reiserfs/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index be12879bb179..044de8be39a7 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -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); |