From 821ddd25fbe88ea60e9c35cfb76c2ddeb1ffae26 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 28 Jan 2026 16:26:18 +0100 Subject: fsverity: start consolidating pagecache code ext4 and f2fs are largely using the same code to read a page full of Merkle tree blocks from the page cache, and the upcoming xfs fsverity support would add another copy. Move the ext4 code to fs/verity/ and use it in f2fs as well. For f2fs this removes the previous f2fs-specific error injection, but otherwise the behavior remains unchanged. Signed-off-by: Christoph Hellwig Reviewed-by: Andrey Albershteyn Reviewed-by: Jan Kara Reviewed-by: "Darrick J. Wong" Link: https://lore.kernel.org/r/20260128152630.627409-7-hch@lst.de Signed-off-by: Eric Biggers --- include/linux/fsverity.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux') diff --git a/include/linux/fsverity.h b/include/linux/fsverity.h index ac5c98fd4602..8ddaa87fece3 100644 --- a/include/linux/fsverity.h +++ b/include/linux/fsverity.h @@ -309,4 +309,7 @@ static inline int fsverity_file_open(struct inode *inode, struct file *filp) void fsverity_cleanup_inode(struct inode *inode); +struct page *generic_read_merkle_tree_page(struct inode *inode, pgoff_t index, + unsigned long num_ra_pages); + #endif /* _LINUX_FSVERITY_H */ -- cgit v1.2.3