summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-06-23 04:30:28 +0200
committerDavid Sterba <dsterba@suse.com>2018-01-22 16:08:18 +0100
commit935db8531fa4d6cc951729a2b5063b6406b71432 (patch)
tree420a0c05ef090b72a238ffdab313c1694afebbb9 /fs/btrfs/extent_io.c
parent25b860e038915ffb6c3d8d3fe8c46272a8d471fe (diff)
downloadlinux-935db8531fa4d6cc951729a2b5063b6406b71432.tar.bz2
btrfs: sink writepage parameter to extent_write_cache_pages
The function extent_write_cache_pages is modelled after write_cache_pages which is a generic interface and the writepage parameter makes sense there. In btrfs we know exactly which callback we're going to use, so we can pass it directly. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index cf106d46a2fd..0ceb427a8e63 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3893,8 +3893,7 @@ retry:
* write_cache_pages - walk the list of dirty pages of the given address space and write all of them.
* @mapping: address space structure to write
* @wbc: subtract the number of written pages from *@wbc->nr_to_write
- * @writepage: function called for each page
- * @data: data passed to writepage function
+ * @data: data passed to __extent_writepage function
*
* If a page is already under I/O, write_cache_pages() skips it, even
* if it's dirty. This is desirable behaviour for memory-cleaning writeback,
@@ -3906,7 +3905,7 @@ retry:
*/
static int extent_write_cache_pages(struct address_space *mapping,
struct writeback_control *wbc,
- writepage_t writepage, void *data)
+ void *data)
{
struct inode *inode = mapping->host;
int ret = 0;
@@ -3991,7 +3990,7 @@ retry:
continue;
}
- ret = (*writepage)(page, wbc, data);
+ ret = __extent_writepage(page, wbc, data);
if (unlikely(ret == AOP_WRITEPAGE_ACTIVATE)) {
unlock_page(page);
@@ -4122,7 +4121,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);
+ ret = extent_write_cache_pages(mapping, wbc, &epd);
flush_write_bio(&epd);
return ret;
}