btrfs: convert __process_pages_contig() to use filemap_get_folios_contig()
authorVishal Moola (Oracle) <vishal.moola@gmail.com>
Wed, 24 Aug 2022 00:40:18 +0000 (17:40 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 Sep 2022 03:26:02 +0000 (20:26 -0700)
commit04c6b79ae4f0bcbd96afd7cea5e1a8848162438e
tree7699069a60f3fa058d028b1b50fe9f7fd7ee89c5
parent35b471467f88b8d8b52ba5b006a29b9d057d09bf
btrfs: convert __process_pages_contig() to use filemap_get_folios_contig()

Convert to use folios throughout.  This is in preparation for the removal
of find_get_pages_contig().  Now also supports large folios.

Since we may receive more than nr_pages pages, nr_pages may underflow.
Since nr_pages > 0 is equivalent to index <= end_index, we replaced it
with this check instead.

Link: https://lkml.kernel.org/r/20220824004023.77310-3-vishal.moola@gmail.com
Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Acked-by: David Sterba <dsterba@suse.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Chris Mason <clm@fb.com>
Cc: David Sterba <dsterb@suse.com>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/btrfs/extent_io.c