mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
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: Mike Galbraith <efault@gmx.de> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
abe8be3abe
commit
18914b1884
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue