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;
}
}
-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);
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)
{
int try_release_extent_mapping(struct page *page, gfp_t mask);
int try_release_extent_buffer(struct page *page);
-int extent_read_full_page(struct page *page);
+int __must_check submit_one_bio(struct bio *bio, int mirror_num,
+ unsigned long bio_flags);
+int extent_read_full_page(struct page *page, struct bio **bio, int mirror_num,
+ unsigned long *bio_flags, unsigned int read_flags);
int extent_write_full_page(struct page *page, struct writeback_control *wbc);
int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
int mode);
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)