aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sync.c')
-rw-r--r--fs/sync.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/sync.c b/fs/sync.c
index 4e15da01923c..192340930bb4 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -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;
236out: 233out:
237 return ret; 234 return ret;
238} 235}