mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-22 23:17:40 +00:00
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:
parent
6f15af6060
commit
fd513000eb
1 changed files with 5 additions and 6 deletions
|
@ -3142,9 +3142,8 @@ __get_extent_map(struct inode *inode, struct page *page, size_t pg_offset,
|
||||||
* return 0 on success, otherwise return error
|
* return 0 on success, otherwise return error
|
||||||
*/
|
*/
|
||||||
static int __do_readpage(struct page *page, struct extent_map **em_cached,
|
static int __do_readpage(struct page *page, struct extent_map **em_cached,
|
||||||
struct bio **bio, int mirror_num,
|
struct bio **bio, unsigned long *bio_flags,
|
||||||
unsigned long *bio_flags, unsigned int read_flags,
|
unsigned int read_flags, u64 *prev_em_start)
|
||||||
u64 *prev_em_start)
|
|
||||||
{
|
{
|
||||||
struct inode *inode = page->mapping->host;
|
struct inode *inode = page->mapping->host;
|
||||||
u64 start = page_offset(page);
|
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,
|
ret = submit_extent_page(REQ_OP_READ | read_flags, NULL,
|
||||||
page, offset, disk_io_size,
|
page, offset, disk_io_size,
|
||||||
pg_offset, bio,
|
pg_offset, bio,
|
||||||
end_bio_extent_readpage, mirror_num,
|
end_bio_extent_readpage, 0,
|
||||||
*bio_flags,
|
*bio_flags,
|
||||||
this_bio_flag,
|
this_bio_flag,
|
||||||
force_bio_submit);
|
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);
|
btrfs_lock_and_flush_ordered_range(inode, start, end, NULL);
|
||||||
|
|
||||||
for (index = 0; index < nr_pages; index++) {
|
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);
|
REQ_RAHEAD, prev_em_start);
|
||||||
put_page(pages[index]);
|
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);
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue