diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 5d284403b411..0f54b104a6ee 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
@@ -838,20 +838,19 @@ retry: | |||
838 | 838 | ||
839 | /* Handle various SYNC-type writes */ | 839 | /* Handle various SYNC-type writes */ |
840 | if ((file->f_flags & O_SYNC) || IS_SYNC(inode)) { | 840 | if ((file->f_flags & O_SYNC) || IS_SYNC(inode)) { |
841 | error = xfs_write_sync_logforce(mp, xip); | 841 | int error2; |
842 | if (error) | ||
843 | goto out_unlock_internal; | ||
844 | |||
845 | xfs_rwunlock(xip, locktype); | 842 | xfs_rwunlock(xip, locktype); |
846 | if (need_i_mutex) | 843 | if (need_i_mutex) |
847 | mutex_unlock(&inode->i_mutex); | 844 | mutex_unlock(&inode->i_mutex); |
848 | 845 | error2 = sync_page_range(inode, mapping, pos, ret); | |
849 | error = sync_page_range(inode, mapping, pos, ret); | ||
850 | if (!error) | 846 | if (!error) |
851 | error = -ret; | 847 | error = error2; |
852 | if (need_i_mutex) | 848 | if (need_i_mutex) |
853 | mutex_lock(&inode->i_mutex); | 849 | mutex_lock(&inode->i_mutex); |
854 | xfs_rwlock(xip, locktype); | 850 | xfs_rwlock(xip, locktype); |
851 | error2 = xfs_write_sync_logforce(mp, xip); | ||
852 | if (!error) | ||
853 | error = error2; | ||
855 | } | 854 | } |
856 | 855 | ||
857 | out_unlock_internal: | 856 | out_unlock_internal: |