diff options
Diffstat (limited to 'fs/sync.c')
-rw-r--r-- | fs/sync.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -218,7 +218,7 @@ int vfs_fsync_range(struct file *file, struct dentry *dentry, loff_t start, | |||
218 | goto out; | 218 | goto out; |
219 | } | 219 | } |
220 | 220 | ||
221 | ret = filemap_fdatawrite_range(mapping, start, end); | 221 | ret = filemap_write_and_wait_range(mapping, start, end); |
222 | 222 | ||
223 | /* | 223 | /* |
224 | * We need to protect against concurrent writers, which could cause | 224 | * We need to protect against concurrent writers, which could cause |
@@ -230,9 +230,6 @@ int vfs_fsync_range(struct file *file, struct dentry *dentry, loff_t start, | |||
230 | ret = err; | 230 | ret = err; |
231 | mutex_unlock(&mapping->host->i_mutex); | 231 | mutex_unlock(&mapping->host->i_mutex); |
232 | 232 | ||
233 | err = filemap_fdatawait_range(mapping, start, end); | ||
234 | if (!ret) | ||
235 | ret = err; | ||
236 | out: | 233 | out: |
237 | return ret; | 234 | return ret; |
238 | } | 235 | } |