aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/hostfs/hostfs_kern.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index cddb05217512..25437280a207 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -361,6 +361,13 @@ retry:
361 return 0; 361 return 0;
362} 362}
363 363
364static int hostfs_file_release(struct inode *inode, struct file *file)
365{
366 filemap_write_and_wait(inode->i_mapping);
367
368 return 0;
369}
370
364int hostfs_fsync(struct file *file, loff_t start, loff_t end, int datasync) 371int hostfs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
365{ 372{
366 struct inode *inode = file->f_mapping->host; 373 struct inode *inode = file->f_mapping->host;
@@ -386,7 +393,7 @@ static const struct file_operations hostfs_file_fops = {
386 .write = do_sync_write, 393 .write = do_sync_write,
387 .mmap = generic_file_mmap, 394 .mmap = generic_file_mmap,
388 .open = hostfs_file_open, 395 .open = hostfs_file_open,
389 .release = NULL, 396 .release = hostfs_file_release,
390 .fsync = hostfs_fsync, 397 .fsync = hostfs_fsync,
391}; 398};
392 399