diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-09-14 12:37:08 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 12:13:20 +0200 |
commit | c1be9c1ad5cca645ffd31284674ee4e28b9472de (patch) | |
tree | 109ee16ef5b01c237f9fd610fa19e6905a52be87 /fs/btrfs/inode.c | |
parent | 72cffee4634058b993685669cab62c5d1c1fee78 (diff) | |
download | lwn-c1be9c1ad5cca645ffd31284674ee4e28b9472de.tar.gz lwn-c1be9c1ad5cca645ffd31284674ee4e28b9472de.zip |
btrfs: promote extent_read_full_page to btrfs_readpage
Now that btrfs_readpage is the only caller of extent_read_full_page the
latter can be open coded in the former. Use the occassion to rename
__extent_read_full_page to extent_read_full_page. To facillitate this
change submit_one_bio has to be exported as well.
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>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index aaf998f3133c..55c5617c180b 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8040,7 +8040,14 @@ static int btrfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, int btrfs_readpage(struct file *file, struct page *page) { - return extent_read_full_page(page); + struct bio *bio = NULL; + unsigned long bio_flags = 0; + int ret; + + ret = extent_read_full_page(page, &bio, 0, &bio_flags, 0); + if (bio) + ret = submit_one_bio(bio, 0, bio_flags); + return ret; } static int btrfs_writepage(struct page *page, struct writeback_control *wbc) |