]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/f2fs/gc.c
f2fs: merge pages with the same sync_mode flag
[mirror_ubuntu-bionic-kernel.git] / fs / f2fs / gc.c
index 29ceb9d71c8c6bb997bc2544a1062bc338715b7e..c68fba5ffadb72dc542e242a3908e6ab0795587c 100644 (file)
@@ -520,6 +520,10 @@ static int check_dnode(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
 
 static void move_data_page(struct inode *inode, struct page *page, int gc_type)
 {
+       struct writeback_control wbc = {
+               .sync_mode = 1,
+       };
+
        if (gc_type == BG_GC) {
                if (PageWriteback(page))
                        goto out;
@@ -536,7 +540,7 @@ static void move_data_page(struct inode *inode, struct page *page, int gc_type)
                        inode_dec_dirty_dents(inode);
                }
                set_cold_data(page);
-               do_write_data_page(page);
+               do_write_data_page(page, &wbc);
                clear_cold_data(page);
        }
 out: