Commit 18914b18 authored by Mike Galbraith's avatar Mike Galbraith Committed by Linus Torvalds

write_inode_now(): avoid unnecessary synchronous write

We shouldn't use WB_SYNC_ALL if the caller is asking for asynchronous
Signed-off-by: default avatarMike Galbraith <>
Acked-by: default avatarJan Kara <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment