浏览代码

hfsplus: avoid useless work in hfsplus_sync_fs

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>
Christoph Hellwig 14 年之前
父节点
当前提交
f02e26f8d9
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      fs/hfsplus/super.c

+ 3 - 0
fs/hfsplus/super.c

@@ -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;