|
|
| version 1.266, 2007/08/24 16:18:10 | version 1.267, 2007/09/11 06:10:53 |
|---|---|
| Line 895 retry: | Line 895 retry: |
| /* Handle various SYNC-type writes */ | /* Handle various SYNC-type writes */ |
| if ((file->f_flags & O_SYNC) || IS_SYNC(inode)) { | if ((file->f_flags & O_SYNC) || IS_SYNC(inode)) { |
| error = xfs_write_sync_logforce(mp, xip); | int error2; |
| if (error) | |
| goto out_unlock_internal; | |
| xfs_rwunlock(xip, locktype); | xfs_rwunlock(xip, locktype); |
| if (need_i_mutex) | if (need_i_mutex) |
| mutex_unlock(&inode->i_mutex); | mutex_unlock(&inode->i_mutex); |
| error2 = sync_page_range(inode, mapping, pos, ret); | |
| error = sync_page_range(inode, mapping, pos, ret); | |
| if (!error) | if (!error) |
| error = -ret; | error = error2; |
| if (need_i_mutex) | if (need_i_mutex) |
| mutex_lock(&inode->i_mutex); | mutex_lock(&inode->i_mutex); |
| xfs_rwlock(xip, locktype); | xfs_rwlock(xip, locktype); |
| error2 = xfs_write_sync_logforce(mp, xip); | |
| if (!error) | |
| error = error2; | |
| } | } |
| out_unlock_internal: | out_unlock_internal: |