diff options
author | Mike Galbraith <efault@gmx.de> | 2008-02-08 04:20:23 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 09:22:34 -0800 |
commit | 18914b1884ebdbcd4d4454100502a23d1d2dba43 (patch) | |
tree | e52412029b3c0d977e12454feb2a13f8415df6d9 /fs/fs-writeback.c | |
parent | abe8be3abe4c2043bd766f32d7eba62c12dbb0b3 (diff) | |
download | linux-3.10-18914b1884ebdbcd4d4454100502a23d1d2dba43.tar.gz linux-3.10-18914b1884ebdbcd4d4454100502a23d1d2dba43.tar.bz2 linux-3.10-18914b1884ebdbcd4d4454100502a23d1d2dba43.zip |
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>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index db80ce9eb1d..c0076077d33 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, }; |