diff options
author | Christoph Hellwig <hch@lst.de> | 2009-06-08 04:04:35 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-11 21:36:15 -0400 |
commit | f83d6d46e7adf241a064a4a425e5cd8a8fd8925f (patch) | |
tree | 3ebefc6dc784ec0156fd3a074b694630b5a88d88 | |
parent | 40f31dd47e7c3d15af1f9845eda0fa0c4c33f32f (diff) |
fat: add ->sync_fs
Add a ->sync_fs method for data integrity syncs.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/fat/inode.c | 11 |
1 files changed, 11 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) | |||
449 | unlock_super(sb); | 449 | unlock_super(sb); |
450 | } | 450 | } |
451 | 451 | ||
452 | static int fat_sync_fs(struct super_block *sb, int wait) | ||
453 | { | ||
454 | lock_super(sb); | ||
455 | fat_clusters_flush(sb); | ||
456 | sb->s_dirt = 0; | ||
457 | unlock_super(sb); | ||
458 | |||
459 | return 0; | ||
460 | } | ||
461 | |||
452 | static void fat_put_super(struct super_block *sb) | 462 | static void fat_put_super(struct super_block *sb) |
453 | { | 463 | { |
454 | struct msdos_sb_info *sbi = MSDOS_SB(sb); | 464 | struct msdos_sb_info *sbi = MSDOS_SB(sb); |
@@ -643,6 +653,7 @@ static const struct super_operations fat_sops = { | |||
643 | .delete_inode = fat_delete_inode, | 653 | .delete_inode = fat_delete_inode, |
644 | .put_super = fat_put_super, | 654 | .put_super = fat_put_super, |
645 | .write_super = fat_write_super, | 655 | .write_super = fat_write_super, |
656 | .sync_fs = fat_sync_fs, | ||
646 | .statfs = fat_statfs, | 657 | .statfs = fat_statfs, |
647 | .clear_inode = fat_clear_inode, | 658 | .clear_inode = fat_clear_inode, |
648 | .remount_fs = fat_remount, | 659 | .remount_fs = fat_remount, |