Commit ec67c83d authored by Vishal Moola (Oracle)'s avatar Vishal Moola (Oracle) Committed by Greg Kroah-Hartman
Browse files

f2fs: convert f2fs_write_cache_pages() to use filemap_get_folios_tag()

[ Upstream commit 1cd98ee7 ]

Convert the function to use a folio_batch instead of pagevec.  This is in
preparation for the removal of find_get_pages_range_tag().

Also modified f2fs_all_cluster_page_ready to take in a folio_batch instead
of pagevec.  This does NOT support large folios.  The function currently
only utilizes folios of size 1 so this shouldn't cause any issues right
now.

This version of the patch limits the number of pages fetched to
F2FS_ONSTACK_PAGES.  If that ever happens, update the start index here
since filemap_get_folios_tag() updates the index to be after the last
found folio, not necessarily the last used page.

Link: https://lkml.kernel.org/r/20230104211448.4804-15-vishal.moola@gmail.com


Signed-off-by: default avatarVishal Moola (Oracle) <vishal.moola@gmail.com>
Acked-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Stable-dep-of: c5d3f9b7 ("f2fs: compress: fix deadloop in f2fs_write_cache_pages()")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 599befdd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment