summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-01-20 23:46:05 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-02-22 16:07:23 -0800
commit25c13551519c66453737e038d104058f94b2e70a (patch)
tree86c3d57f7fc0111a99e8b8de4d45641932f1c2d0
parentb483fadf7e913be838e11e065175205aa17e429a (diff)
downloadlinux-25c13551519c66453737e038d104058f94b2e70a.tar.bz2
f2fs: use writepages->lock for WB_SYNC_ALL
If there are many writepages calls by multiple threads in background, we don't need to serialize to merge all the bios, since it's background. In such the case, it'd better to run writepages concurrently. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index e8d4158a3206..0f0187804eda 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1402,7 +1402,7 @@ static int f2fs_write_data_pages(struct address_space *mapping,
diff = nr_pages_to_write(sbi, DATA, wbc);
- if (!S_ISDIR(inode->i_mode)) {
+ if (!S_ISDIR(inode->i_mode) && wbc->sync_mode == WB_SYNC_ALL) {
mutex_lock(&sbi->writepages);
locked = true;
}