btrfs: sink get_extent parameter to extent_readpages
authorDavid Sterba <dsterba@suse.com>
Fri, 23 Jun 2017 02:09:57 +0000 (04:09 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:13 +0000 (16:08 +0100)
There's only one caller that passes btrfs_get_extent.

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

index 3f5debc5e56f4ef304a4e05e07986503ac659213..f86a6aae545ae38a33949fcd201adbf2b7b076ec 100644 (file)
@@ -4133,8 +4133,7 @@ int extent_writepages(struct extent_io_tree *tree,
 
 int extent_readpages(struct extent_io_tree *tree,
                     struct address_space *mapping,
-                    struct list_head *pages, unsigned nr_pages,
-                    get_extent_t get_extent)
+                    struct list_head *pages, unsigned nr_pages)
 {
        struct bio *bio = NULL;
        unsigned page_idx;
@@ -4160,13 +4159,13 @@ int extent_readpages(struct extent_io_tree *tree,
                pagepool[nr++] = page;
                if (nr < ARRAY_SIZE(pagepool))
                        continue;
-               __extent_readpages(tree, pagepool, nr, get_extent, &em_cached,
-                                  &bio, &bio_flags, &prev_em_start);
+               __extent_readpages(tree, pagepool, nr, btrfs_get_extent,
+                               &em_cached, &bio, &bio_flags, &prev_em_start);
                nr = 0;
        }
        if (nr)
-               __extent_readpages(tree, pagepool, nr, get_extent, &em_cached,
-                                  &bio, &bio_flags, &prev_em_start);
+               __extent_readpages(tree, pagepool, nr, btrfs_get_extent,
+                               &em_cached, &bio, &bio_flags, &prev_em_start);
 
        if (em_cached)
                free_extent_map(em_cached);
index afc169d04b2258f212e423f5fc416a4a1aa0ca2d..6cf4a0e5b0eaeb2814082bab83e686b4cf95f06d 100644 (file)
@@ -414,8 +414,7 @@ int btree_write_cache_pages(struct address_space *mapping,
                            struct writeback_control *wbc);
 int extent_readpages(struct extent_io_tree *tree,
                     struct address_space *mapping,
-                    struct list_head *pages, unsigned nr_pages,
-                    get_extent_t get_extent);
+                    struct list_head *pages, unsigned nr_pages);
 int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
                __u64 start, __u64 len);
 void set_page_extent_mapped(struct page *page);
index 63cf6cd174d161fd1f9cb39e3efdd62234be132c..72c7b38fb17e5a4b9b21a337d8b363e7d3ca2676 100644 (file)
@@ -8911,8 +8911,7 @@ btrfs_readpages(struct file *file, struct address_space *mapping,
 {
        struct extent_io_tree *tree;
        tree = &BTRFS_I(mapping->host)->io_tree;
-       return extent_readpages(tree, mapping, pages, nr_pages,
-                               btrfs_get_extent);
+       return extent_readpages(tree, mapping, pages, nr_pages);
 }
 static int __btrfs_releasepage(struct page *page, gfp_t gfp_flags)
 {