Commit 0932584b authored by David Sterba's avatar David Sterba

btrfs: sink get_extent parameter to extent_readpages

There's only one caller that passes btrfs_get_extent.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent e3350e16
...@@ -4133,8 +4133,7 @@ int extent_writepages(struct extent_io_tree *tree, ...@@ -4133,8 +4133,7 @@ int extent_writepages(struct extent_io_tree *tree,
int extent_readpages(struct extent_io_tree *tree, int extent_readpages(struct extent_io_tree *tree,
struct address_space *mapping, struct address_space *mapping,
struct list_head *pages, unsigned nr_pages, struct list_head *pages, unsigned nr_pages)
get_extent_t get_extent)
{ {
struct bio *bio = NULL; struct bio *bio = NULL;
unsigned page_idx; unsigned page_idx;
...@@ -4160,13 +4159,13 @@ int extent_readpages(struct extent_io_tree *tree, ...@@ -4160,13 +4159,13 @@ int extent_readpages(struct extent_io_tree *tree,
pagepool[nr++] = page; pagepool[nr++] = page;
if (nr < ARRAY_SIZE(pagepool)) if (nr < ARRAY_SIZE(pagepool))
continue; continue;
__extent_readpages(tree, pagepool, nr, get_extent, &em_cached, __extent_readpages(tree, pagepool, nr, btrfs_get_extent,
&bio, &bio_flags, &prev_em_start); &em_cached, &bio, &bio_flags, &prev_em_start);
nr = 0; nr = 0;
} }
if (nr) if (nr)
__extent_readpages(tree, pagepool, nr, get_extent, &em_cached, __extent_readpages(tree, pagepool, nr, btrfs_get_extent,
&bio, &bio_flags, &prev_em_start); &em_cached, &bio, &bio_flags, &prev_em_start);
if (em_cached) if (em_cached)
free_extent_map(em_cached); free_extent_map(em_cached);
......
...@@ -414,8 +414,7 @@ int btree_write_cache_pages(struct address_space *mapping, ...@@ -414,8 +414,7 @@ int btree_write_cache_pages(struct address_space *mapping,
struct writeback_control *wbc); struct writeback_control *wbc);
int extent_readpages(struct extent_io_tree *tree, int extent_readpages(struct extent_io_tree *tree,
struct address_space *mapping, struct address_space *mapping,
struct list_head *pages, unsigned nr_pages, struct list_head *pages, unsigned nr_pages);
get_extent_t get_extent);
int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
__u64 start, __u64 len); __u64 start, __u64 len);
void set_page_extent_mapped(struct page *page); void set_page_extent_mapped(struct page *page);
......
...@@ -8911,8 +8911,7 @@ btrfs_readpages(struct file *file, struct address_space *mapping, ...@@ -8911,8 +8911,7 @@ btrfs_readpages(struct file *file, struct address_space *mapping,
{ {
struct extent_io_tree *tree; struct extent_io_tree *tree;
tree = &BTRFS_I(mapping->host)->io_tree; tree = &BTRFS_I(mapping->host)->io_tree;
return extent_readpages(tree, mapping, pages, nr_pages, return extent_readpages(tree, mapping, pages, nr_pages);
btrfs_get_extent);
} }
static int __btrfs_releasepage(struct page *page, gfp_t gfp_flags) static int __btrfs_releasepage(struct page *page, gfp_t gfp_flags)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment