hfsplus: avoid useless work in hfsplus_sync_fs
authorChristoph Hellwig <hch@tuxera.com>
Tue, 23 Nov 2010 13:38:02 +0000 (14:38 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 23 Nov 2010 13:38:02 +0000 (14:38 +0100)
There is no reason to write out the metadata inodes or volume headers
during a non-blocking sync, as we are almost guaranteed to dirty them
again during the inode writeouts.

Signed-off-by: Christoph Hellwig <hch@tuxera.com>
fs/hfsplus/super.c

index df6bea0..56e6cf8 100644 (file)
@@ -160,6 +160,9 @@ int hfsplus_sync_fs(struct super_block *sb, int wait)
        int write_backup = 0;
        int error, error2;
 
+       if (!wait)
+               return 0;
+
        dprint(DBG_SUPER, "hfsplus_write_super\n");
 
        sb->s_dirt = 0;