btrfs: sink mirror_num argument in __do_readpage

It's always set to 0 by the 2 callers so move it inside __do_readpage.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Nikolay Borisov 2020-09-14 12:37:11 +03:00 committed by David Sterba
parent 6f15af6060
commit fd513000eb
1 changed files with 5 additions and 6 deletions

View File

@ -3142,9 +3142,8 @@ __get_extent_map(struct inode *inode, struct page *page, size_t pg_offset,
* return 0 on success, otherwise return error
*/
static int __do_readpage(struct page *page, struct extent_map **em_cached,
struct bio **bio, int mirror_num,
unsigned long *bio_flags, unsigned int read_flags,
u64 *prev_em_start)
struct bio **bio, unsigned long *bio_flags,
unsigned int read_flags, u64 *prev_em_start)
{
struct inode *inode = page->mapping->host;
u64 start = page_offset(page);
@ -3322,7 +3321,7 @@ static int __do_readpage(struct page *page, struct extent_map **em_cached,
ret = submit_extent_page(REQ_OP_READ | read_flags, NULL,
page, offset, disk_io_size,
pg_offset, bio,
end_bio_extent_readpage, mirror_num,
end_bio_extent_readpage, 0,
*bio_flags,
this_bio_flag,
force_bio_submit);
@ -3359,7 +3358,7 @@ static inline void contiguous_readpages(struct page *pages[], int nr_pages,
btrfs_lock_and_flush_ordered_range(inode, start, end, NULL);
for (index = 0; index < nr_pages; index++) {
__do_readpage(pages[index], em_cached, bio, 0, bio_flags,
__do_readpage(pages[index], em_cached, bio, bio_flags,
REQ_RAHEAD, prev_em_start);
put_page(pages[index]);
}
@ -3375,7 +3374,7 @@ int extent_read_full_page(struct page *page, struct bio **bio,
btrfs_lock_and_flush_ordered_range(inode, start, end, NULL);
ret = __do_readpage(page, NULL, bio, 0, bio_flags, 0, NULL);
ret = __do_readpage(page, NULL, bio, bio_flags, 0, NULL);
return ret;
}