]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fsverity: start consolidating pagecache code
authorChristoph Hellwig <hch@lst.de>
Wed, 28 Jan 2026 15:26:18 +0000 (16:26 +0100)
committerEric Biggers <ebiggers@kernel.org>
Thu, 29 Jan 2026 17:39:41 +0000 (09:39 -0800)
commit821ddd25fbe88ea60e9c35cfb76c2ddeb1ffae26
tree7ef1f85cb965a4c9fc9ee62d29dabdd87175c510
parentac09a30900d81ac10606f650e3c720cfafa37be0
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 <hch@lst.de>
Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Link: https://lore.kernel.org/r/20260128152630.627409-7-hch@lst.de
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
fs/ext4/verity.c
fs/f2fs/verity.c
fs/verity/Makefile
fs/verity/pagecache.c [new file with mode: 0644]
include/linux/fsverity.h