aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exofs/file.c')
-rw-r--r--fs/exofs/file.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/exofs/file.c b/fs/exofs/file.c
index 45ca323d8363..491c6c078e7f 100644
--- a/fs/exofs/file.c
+++ b/fs/exofs/file.c
@@ -42,11 +42,19 @@ static int exofs_release_file(struct inode *inode, struct file *filp)
42 * Note, in exofs all metadata is written as part of inode, regardless. 42 * Note, in exofs all metadata is written as part of inode, regardless.
43 * The writeout is synchronous 43 * The writeout is synchronous
44 */ 44 */
45static int exofs_file_fsync(struct file *filp, int datasync) 45static int exofs_file_fsync(struct file *filp, loff_t start, loff_t end,
46 int datasync)
46{ 47{
48 struct inode *inode = filp->f_mapping->host;
47 int ret; 49 int ret;
48 50
51 ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
52 if (ret)
53 return ret;
54
55 mutex_lock(&inode->i_mutex);
49 ret = sync_inode_metadata(filp->f_mapping->host, 1); 56 ret = sync_inode_metadata(filp->f_mapping->host, 1);
57 mutex_unlock(&inode->i_mutex);
50 return ret; 58 return ret;
51} 59}
52 60