f2fs: remove else in f2fs_write_cache_pages()
authorYangtao Li <frank.li@vivo.com>
Mon, 20 Mar 2023 17:31:36 +0000 (01:31 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 29 Mar 2023 22:17:39 +0000 (15:17 -0700)
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>
fs/f2fs/data.c

index bf51e6e..fa931fb 100644 (file)
@@ -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))