Skip to content

Commit 78cdb14

Browse files
author
Eric Biggers
committed
f2fs: make f2fs_verify_cluster() partially large-folio-aware
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. Currently, it's never called with large folios. Suggested-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20260218010630.7407-3-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
1 parent 079220c commit 78cdb14

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

fs/f2fs/compress.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,13 +1813,14 @@ static void f2fs_verify_cluster(struct work_struct *work)
18131813
/* Verify, update, and unlock the decompressed pages. */
18141814
for (i = 0; i < dic->cluster_size; i++) {
18151815
struct page *rpage = dic->rpages[i];
1816+
struct folio *rfolio;
18161817

18171818
if (!rpage)
18181819
continue;
1819-
1820-
if (fsverity_verify_page(dic->vi, rpage))
1821-
SetPageUptodate(rpage);
1822-
unlock_page(rpage);
1820+
rfolio = page_folio(rpage);
1821+
if (fsverity_verify_folio(dic->vi, rfolio))
1822+
folio_mark_uptodate(rfolio);
1823+
folio_unlock(rfolio);
18231824
}
18241825

18251826
f2fs_put_dic(dic, true);

0 commit comments

Comments
 (0)