mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 17:57:38 -04:00
fsverity: push out fsverity_info lookup
Pass a struct fsverity_info to the verification and readahead helpers, and push the lookup into the callers. Right now this is a very dumb almost mechanic move that open codes a lot of fsverity_info_addr() calls in the file systems. The subsequent patches will clean this up. This prepares for reducing the number of fsverity_info lookups, which will allow to amortize them better when using a more expensive lookup method. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Acked-by: David Sterba <dsterba@suse.com> # btrfs Link: https://lore.kernel.org/r/20260202060754.270269-7-hch@lst.de Signed-off-by: Eric Biggers <ebiggers@kernel.org>
This commit is contained in:
committed by
Eric Biggers
parent
7e36e04495
commit
47bc2ac9b6
@@ -309,9 +309,11 @@ static void verify_bh(struct work_struct *work)
|
||||
struct postprocess_bh_ctx *ctx =
|
||||
container_of(work, struct postprocess_bh_ctx, work);
|
||||
struct buffer_head *bh = ctx->bh;
|
||||
struct inode *inode = bh->b_folio->mapping->host;
|
||||
bool valid;
|
||||
|
||||
valid = fsverity_verify_blocks(bh->b_folio, bh->b_size, bh_offset(bh));
|
||||
valid = fsverity_verify_blocks(*fsverity_info_addr(inode), bh->b_folio,
|
||||
bh->b_size, bh_offset(bh));
|
||||
end_buffer_async_read(bh, valid);
|
||||
kfree(ctx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user