mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 01:32:47 -04:00
btrfs: convert btrfs_read_folio() to only use a folio
Currently we're using the page for everything here. Convert this to use the folio helpers instead. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
03d6612648
commit
e19317ed9e
@@ -1155,17 +1155,16 @@ static int btrfs_do_readpage(struct page *page, struct extent_map **em_cached,
|
||||
|
||||
int btrfs_read_folio(struct file *file, struct folio *folio)
|
||||
{
|
||||
struct page *page = &folio->page;
|
||||
struct btrfs_inode *inode = page_to_inode(page);
|
||||
u64 start = page_offset(page);
|
||||
u64 end = start + PAGE_SIZE - 1;
|
||||
struct btrfs_inode *inode = folio_to_inode(folio);
|
||||
u64 start = folio_pos(folio);
|
||||
u64 end = start + folio_size(folio) - 1;
|
||||
struct btrfs_bio_ctrl bio_ctrl = { .opf = REQ_OP_READ };
|
||||
struct extent_map *em_cached = NULL;
|
||||
int ret;
|
||||
|
||||
btrfs_lock_and_flush_ordered_range(inode, start, end, NULL);
|
||||
|
||||
ret = btrfs_do_readpage(page, &em_cached, &bio_ctrl, NULL);
|
||||
ret = btrfs_do_readpage(&folio->page, &em_cached, &bio_ctrl, NULL);
|
||||
free_extent_map(em_cached);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user