From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: [PATCH 6/12] hfs: add ->sync_fs Date: Mon, 8 Jun 2009 10:04:54 +0200 Message-ID: <20090608080454.GG20735@lst.de> References: <20090608080252.GA20735@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: viro@zeniv.linux.org.uk Return-path: Received: from verein.lst.de ([213.95.11.210]:33396 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754022AbZFHIEx (ORCPT ); Mon, 8 Jun 2009 04:04:53 -0400 Content-Disposition: inline In-Reply-To: <20090608080252.GA20735@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Add a ->sync_fs method for data integrity syncs. Signed-off-by: Christoph Hellwig Index: vfs-2.6/fs/hfs/super.c =================================================================== --- vfs-2.6.orig/fs/hfs/super.c 2009-06-05 16:15:48.967939658 +0200 +++ vfs-2.6/fs/hfs/super.c 2009-06-05 16:16:53.655939519 +0200 @@ -58,6 +58,16 @@ static void hfs_write_super(struct super 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 .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,