btrfs: sink flush_fn to extent_write_cache_pages
authorDavid Sterba <dsterba@suse.com>
Fri, 23 Jun 2017 02:30:28 +0000 (04:30 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:18 +0000 (16:08 +0100)
All callers pass the same value flush_write_bio.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c

index f1842d59fffead1ed916105a9b7f46cc16596681..cf106d46a2fd3fe16dac46768153ae5382f8aa60 100644 (file)
@@ -3906,8 +3906,7 @@ retry:
  */
 static int extent_write_cache_pages(struct address_space *mapping,
                             struct writeback_control *wbc,
-                            writepage_t writepage, void *data,
-                            void (*flush_fn)(void *))
+                            writepage_t writepage, void *data)
 {
        struct inode *inode = mapping->host;
        int ret = 0;
@@ -3971,7 +3970,7 @@ retry:
                         * mapping
                         */
                        if (!trylock_page(page)) {
-                               flush_fn(data);
+                               flush_write_bio(data);
                                lock_page(page);
                        }
 
@@ -3982,7 +3981,7 @@ retry:
 
                        if (wbc->sync_mode != WB_SYNC_NONE) {
                                if (PageWriteback(page))
-                                       flush_fn(data);
+                                       flush_write_bio(data);
                                wait_on_page_writeback(page);
                        }
 
@@ -4123,8 +4122,7 @@ int extent_writepages(struct extent_io_tree *tree,
                .sync_io = wbc->sync_mode == WB_SYNC_ALL,
        };
 
-       ret = extent_write_cache_pages(mapping, wbc, __extent_writepage, &epd,
-                                      flush_write_bio);
+       ret = extent_write_cache_pages(mapping, wbc, __extent_writepage, &epd);
        flush_write_bio(&epd);
        return ret;
 }