提交 18914b18 编写于 作者: M Mike Galbraith 提交者: Linus Torvalds

write_inode_now(): avoid unnecessary synchronous write

We shouldn't use WB_SYNC_ALL if the caller is asking for asynchronous
treatment.
Signed-off-by: NMike Galbraith <efault@gmx.de>
Acked-by: NJan Kara <jack@suse.cz>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 abe8be3a
......@@ -655,7 +655,7 @@ int write_inode_now(struct inode *inode, int sync)
int ret;
struct writeback_control wbc = {
.nr_to_write = LONG_MAX,
.sync_mode = WB_SYNC_ALL,
.sync_mode = sync ? WB_SYNC_ALL : WB_SYNC_NONE,
.range_start = 0,
.range_end = LLONG_MAX,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册