VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Christoph Hellwig <hch@lst.de> 2009-06-08 10:04:35 +0200 committer: Al Viro <viro@zeniv.linux.org.uk> 2009-06-11 21:36:15 -0400 commit: f83d6d46e7adf241a064a4a425e5cd8a8fd8925f parent: 40f31dd47e7c3d15af1f9845eda0fa0c4c33f32f
Commit Summary:
fat: add ->sync_fs
Diffstat:
1 file changed, 10 insertions, 0 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 476f80b175fe..51a5ecf9000a 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -449,6 +449,16 @@ static void fat_write_super(struct super_block *sb)
 	unlock_super(sb);
 }
 
+static int fat_sync_fs(struct super_block *sb, int wait)
+{
+	lock_super(sb);
+	fat_clusters_flush(sb);
+	sb->s_dirt = 0;
+	unlock_super(sb);
+
+	return 0;
+}
+
 static void fat_put_super(struct super_block *sb)
 {
 	struct msdos_sb_info *sbi = MSDOS_SB(sb);
@@ -643,6 +653,7 @@ static const struct super_operations fat_sops = {
 	.delete_inode	= fat_delete_inode,
 	.put_super	= fat_put_super,
 	.write_super	= fat_write_super,
+	.sync_fs	= fat_sync_fs,
 	.statfs		= fat_statfs,
 	.clear_inode	= fat_clear_inode,
 	.remount_fs	= fat_remount,