diff options
author | Josef Bacik <josef@toxicpanda.com> | 2024-07-24 16:20:02 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-09-10 16:51:14 +0200 |
commit | a59ff7201a1586a76035140c8871e0e8c3a89449 (patch) | |
tree | 964ff6c2f379d5b1a1ef8fed36715cd20ba7683c /fs/btrfs/extent_io.c | |
parent | 79be4a28d834eacab2e827985f8fa7951a9122b5 (diff) |
btrfs: convert __process_pages_contig() to take a folio
This operates mostly on folios, update it to take a folio for the locked
folio instead of the page, rename from __process_pages_contig =>
__process_folios_contig.
Signed-off-by: Josef Bacik <josef@toxicpanda.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.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 79b621277577..c91ec5661ee3 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -187,9 +187,9 @@ static void process_one_page(struct btrfs_fs_info *fs_info, btrfs_folio_end_writer_lock(fs_info, folio, start, len); } -static void __process_pages_contig(struct address_space *mapping, - const struct page *locked_page, u64 start, u64 end, - unsigned long page_ops) +static void __process_folios_contig(struct address_space *mapping, + const struct folio *locked_folio, u64 start, + u64 end, unsigned long page_ops) { struct btrfs_fs_info *fs_info = inode_to_fs_info(mapping->host); pgoff_t start_index = start >> PAGE_SHIFT; @@ -207,8 +207,9 @@ static void __process_pages_contig(struct address_space *mapping, for (i = 0; i < found_folios; i++) { struct folio *folio = fbatch.folios[i]; - process_one_page(fs_info, &folio->page, locked_page, - page_ops, start, end); + process_one_page(fs_info, &folio->page, + &locked_folio->page, page_ops, start, + end); } folio_batch_release(&fbatch); cond_resched(); @@ -226,8 +227,8 @@ static noinline void __unlock_for_delalloc(const struct inode *inode, if (index == locked_folio->index && end_index == index) return; - __process_pages_contig(inode->i_mapping, &locked_folio->page, start, - end, PAGE_UNLOCK); + __process_folios_contig(inode->i_mapping, locked_folio, start, end, + PAGE_UNLOCK); } static noinline int lock_delalloc_folios(struct inode *inode, @@ -401,8 +402,8 @@ void extent_clear_unlock_delalloc(struct btrfs_inode *inode, u64 start, u64 end, { clear_extent_bit(&inode->io_tree, start, end, clear_bits, cached); - __process_pages_contig(inode->vfs_inode.i_mapping, locked_page, - start, end, page_ops); + __process_folios_contig(inode->vfs_inode.i_mapping, + page_folio(locked_page), start, end, page_ops); } static bool btrfs_verify_folio(struct folio *folio, u64 start, u32 len) |