]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
hfs: add ->sync_fs
authorChristoph Hellwig <hch@lst.de>
Mon, 8 Jun 2009 08:04:54 +0000 (10:04 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 12 Jun 2009 01:36:15 +0000 (21:36 -0400)
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>
fs/hfs/super.c

index 3aac4175103017d47c57796d8631b705d53dcc90..6f833dc8e91022411939a290988af8a36e8d2018 100644 (file)
@@ -58,6 +58,16 @@ static void hfs_write_super(struct super_block *sb)
        unlock_super(sb);
 }
 
+static int hfs_sync_fs(struct super_block *sb, int wait)
+{
+       lock_super(sb);
+       hfs_mdb_commit(sb);
+       sb->s_dirt = 0;
+       unlock_super(sb);
+
+       return 0;
+}
+
 /*
  * hfs_put_super()
  *
@@ -172,6 +182,7 @@ static const struct super_operations hfs_super_operations = {
        .clear_inode    = hfs_clear_inode,
        .put_super      = hfs_put_super,
        .write_super    = hfs_write_super,
+       .sync_fs        = hfs_sync_fs,
        .statfs         = hfs_statfs,
        .remount_fs     = hfs_remount,
        .show_options   = hfs_show_options,