summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-03-20 18:31:36 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2023-03-30 00:17:39 +0200
commitc948be797da8ddbb1ec2f5cccad1c8629c69db79 (patch)
treee31a4bb7498d12216034a0f8f68945137a88e9a8 /fs/f2fs
parentf2fs: apply zone capacity to all zone type (diff)
downloadlinux-c948be797da8ddbb1ec2f5cccad1c8629c69db79.tar.xz
linux-c948be797da8ddbb1ec2f5cccad1c8629c69db79.zip
f2fs: remove else in f2fs_write_cache_pages()
As Christoph Hellwig point out: Please avoid the else by doing the goto in the branch. Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/data.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index bf51e6e4eb64..fa931fb768e7 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -3123,12 +3123,9 @@ continue_unlock:
}
if (folio_test_writeback(folio)) {
- if (wbc->sync_mode != WB_SYNC_NONE)
- f2fs_wait_on_page_writeback(
- &folio->page,
- DATA, true, true);
- else
+ if (wbc->sync_mode == WB_SYNC_NONE)
goto continue_unlock;
+ f2fs_wait_on_page_writeback(&folio->page, DATA, true, true);
}
if (!folio_clear_dirty_for_io(folio))