btrfs: open code extent_read_full_page to its sole caller

This makes reading the code a tad easier by decreasing the level of
indirection by one.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.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 14:39:16 +03:00
committed by David Sterba
parent fd513000eb
commit 0f20881249
3 changed files with 15 additions and 23 deletions

View File

@@ -8040,11 +8040,16 @@ static int btrfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
int btrfs_readpage(struct file *file, struct page *page)
{
struct bio *bio = NULL;
struct btrfs_inode *inode = BTRFS_I(page->mapping->host);
u64 start = page_offset(page);
u64 end = start + PAGE_SIZE - 1;
unsigned long bio_flags = 0;
struct bio *bio = NULL;
int ret;
ret = extent_read_full_page(page, &bio, &bio_flags);
btrfs_lock_and_flush_ordered_range(inode, start, end, NULL);
ret = btrfs_do_readpage(page, NULL, &bio, &bio_flags, 0, NULL);
if (bio)
ret = submit_one_bio(bio, 0, bio_flags);
return ret;