Skip to content

Commit 935db85

Browse files
committed
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>
1 parent 25b860e commit 935db85

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/btrfs/extent_io.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3893,8 +3893,7 @@ int btree_write_cache_pages(struct address_space *mapping,
38933893
* write_cache_pages - walk the list of dirty pages of the given address space and write all of them.
38943894
* @mapping: address space structure to write
38953895
* @wbc: subtract the number of written pages from *@wbc->nr_to_write
3896-
* @writepage: function called for each page
3897-
* @data: data passed to writepage function
3896+
* @data: data passed to __extent_writepage function
38983897
*
38993898
* If a page is already under I/O, write_cache_pages() skips it, even
39003899
* if it's dirty. This is desirable behaviour for memory-cleaning writeback,
@@ -3906,7 +3905,7 @@ int btree_write_cache_pages(struct address_space *mapping,
39063905
*/
39073906
static int extent_write_cache_pages(struct address_space *mapping,
39083907
struct writeback_control *wbc,
3909-
writepage_t writepage, void *data)
3908+
void *data)
39103909
{
39113910
struct inode *inode = mapping->host;
39123911
int ret = 0;
@@ -3991,7 +3990,7 @@ static int extent_write_cache_pages(struct address_space *mapping,
39913990
continue;
39923991
}
39933992

3994-
ret = (*writepage)(page, wbc, data);
3993+
ret = __extent_writepage(page, wbc, data);
39953994

39963995
if (unlikely(ret == AOP_WRITEPAGE_ACTIVATE)) {
39973996
unlock_page(page);
@@ -4122,7 +4121,7 @@ int extent_writepages(struct extent_io_tree *tree,
41224121
.sync_io = wbc->sync_mode == WB_SYNC_ALL,
41234122
};
41244123

4125-
ret = extent_write_cache_pages(mapping, wbc, __extent_writepage, &epd);
4124+
ret = extent_write_cache_pages(mapping, wbc, &epd);
41264125
flush_write_bio(&epd);
41274126
return ret;
41284127
}

0 commit comments

Comments
 (0)