hfsplus: flush disk caches in sync and fsync
[deliverable/linux.git] / fs / hfsplus / inode.c
index bf6535b73261ec697fdd460606740f26fcc11a58..bda7464c205d1b07f0641f6e6524466e504cd273 100644 (file)
@@ -8,6 +8,7 @@
  * Inode handling routines
  */
 
+#include <linux/blkdev.h>
 #include <linux/mm.h>
 #include <linux/fs.h>
 #include <linux/pagemap.h>
@@ -334,6 +335,9 @@ int hfsplus_file_fsync(struct file *file, int datasync)
                        error = error2;
        }
 
+       if (!test_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags))
+               blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
+
        return error;
 }
 
This page took 0.023826 seconds and 5 git commands to generate.