summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2020-09-14 12:37:08 +0300
committerDavid Sterba <dsterba@suse.com>2020-10-07 12:13:20 +0200
commitc1be9c1ad5cca645ffd31284674ee4e28b9472de (patch)
tree109ee16ef5b01c237f9fd610fa19e6905a52be87 /fs/btrfs/extent_io.c
parent72cffee4634058b993685669cab62c5d1c1fee78 (diff)
downloadlwn-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/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 355db40a1cb5..402b88ddcbca 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -160,8 +160,8 @@ static int add_extent_changeset(struct extent_state *state, unsigned bits,
return ret;
}
-static int __must_check submit_one_bio(struct bio *bio, int mirror_num,
- unsigned long bio_flags)
+int __must_check submit_one_bio(struct bio *bio, int mirror_num,
+ unsigned long bio_flags)
{
blk_status_t ret = 0;
struct extent_io_tree *tree = bio->bi_private;
@@ -3365,9 +3365,8 @@ static inline void contiguous_readpages(struct page *pages[], int nr_pages,
}
}
-static int __extent_read_full_page(struct page *page, struct bio **bio,
- int mirror_num, unsigned long *bio_flags,
- unsigned int read_flags)
+int extent_read_full_page(struct page *page, struct bio **bio, int mirror_num,
+ unsigned long *bio_flags, unsigned int read_flags)
{
struct btrfs_inode *inode = BTRFS_I(page->mapping->host);
u64 start = page_offset(page);
@@ -3381,18 +3380,6 @@ static int __extent_read_full_page(struct page *page, struct bio **bio,
return ret;
}
-int extent_read_full_page(struct 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 void update_nr_written(struct writeback_control *wbc,
unsigned long nr_written)
{