diff --git a/fs/fat/inode.c b/fs/fat/inode.c index a38238d75c08ed..c13410e4e6d804 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -823,6 +823,14 @@ static int fat_remount(struct super_block *sb, int *flags, char *data) return 0; } +static int fat_sync_fs(struct super_block *sb, int wait) +{ + if (wait) + return blkdev_issue_flush(sb->s_bdev, GFP_KERNEL, NULL); + else + return 0; +} + static int fat_statfs(struct dentry *dentry, struct kstatfs *buf) { struct super_block *sb = dentry->d_sb; @@ -937,6 +945,7 @@ static const struct super_operations fat_sops = { .put_super = fat_put_super, .statfs = fat_statfs, .remount_fs = fat_remount, + .sync_fs = fat_sync_fs, .show_options = fat_show_options, };