diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index db80ce9eb1d07896fb3ddd5f545ed8876dc8b2fa..c0076077d33874d0d63322d7c698ccbb04e4ed78 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -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, };