[PATCH v3 1/2] f2fs: make f2fs_verify_cluster() partially large-folio-aware

Eric Biggers
2026-02-15T04:29:03Z

f2fs_verify_cluster() is the only remaining caller of the
non-large-folio-aware function fsverity_verify_page(). To unblock the
removal of that function, change f2fs_verify_cluster() to verify the
entire folio of each page and mark it up-to-date.

Note that this doesn't actually make f2fs_verify_cluster()
large-folio-aware, as it is still passed an array of pages.

In addition, remove the unnecessary clearing of the up-to-date flag.
It's guaranteed to already be clear.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
fs/f2fs/compress.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 006a80acd1de..8c76400ba631 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1811,19 +1811,18 @@ static void f2fs_verify_cluster(struct work_struct *work)
int i;

/* Verify, update, and unlock the decompressed pages. */
for (i = 0; i < dic->cluster_size; i++) {
struct page *rpage = dic->rpages[i];
+ struct folio *rfolio;

if (!rpage)
continue;
-
- if (fsverity_verify_page(dic->vi, rpage))
- SetPageUptodate(rpage);
- else
- ClearPageUptodate(rpage);
- unlock_page(rpage);
+ rfolio = page_folio(rpage);
+ if (fsverity_verify_folio(dic->vi, rfolio))
+ folio_mark_uptodate(rfolio);
+ folio_unlock(rfolio);
}

f2fs_put_dic(dic, true);
}

--
2.53.0