Commit f83d6d46e7adf241a064a4a425e5cd8a8fd8925f
Committed by
Al Viro
1 parent
40f31dd47e
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 11 additions and 0 deletions Side-by-side Diff
fs/fat/inode.c
... | ... | @@ -449,6 +449,16 @@ |
449 | 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 | 462 | static void fat_put_super(struct super_block *sb) |
453 | 463 | { |
454 | 464 | struct msdos_sb_info *sbi = MSDOS_SB(sb); |
... | ... | @@ -643,6 +653,7 @@ |
643 | 653 | .delete_inode = fat_delete_inode, |
644 | 654 | .put_super = fat_put_super, |
645 | 655 | .write_super = fat_write_super, |
656 | + .sync_fs = fat_sync_fs, | |
646 | 657 | .statfs = fat_statfs, |
647 | 658 | .clear_inode = fat_clear_inode, |
648 | 659 | .remount_fs = fat_remount, |