diff options
author | Christoph Hellwig <hch@lst.de> | 2022-04-15 16:33:24 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-05-16 17:03:14 +0200 |
commit | 7aab8b32825eecd36ce8eef72dffd331724185da (patch) | |
tree | 435581cd031d477aacc22f59ba0ddaffeb35f06d /fs/btrfs/inode.c | |
parent | d201238ccd2f30b9bfcfadaeae0972e3a486a176 (diff) |
btrfs: move btrfs_readpage to extent_io.c
Keep btrfs_readpage next to btrfs_do_readpage and the other address
space operations. This allows to keep submit_one_bio and
struct btrfs_bio_ctrl file local in extent_io.c.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
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 | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 44b7c9a7c84db..0b87fdeb7079d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8136,26 +8136,6 @@ static int btrfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, return extent_fiemap(BTRFS_I(inode), fieinfo, start, len); } -int btrfs_readpage(struct file *file, struct page *page) -{ - struct btrfs_inode *inode = BTRFS_I(page->mapping->host); - u64 start = page_offset(page); - u64 end = start + PAGE_SIZE - 1; - struct btrfs_bio_ctrl bio_ctrl = { 0 }; - int ret; - - btrfs_lock_and_flush_ordered_range(inode, start, end, NULL); - - ret = btrfs_do_readpage(page, NULL, &bio_ctrl, 0, NULL); - /* - * If btrfs_do_readpage() failed we will want to submit the assembled - * bio to do the cleanup. - */ - if (bio_ctrl.bio) - submit_one_bio(bio_ctrl.bio, 0, bio_ctrl.bio_flags); - return ret; -} - static int btrfs_writepage(struct page *page, struct writeback_control *wbc) { struct inode *inode = page->mapping->host; |