diff options
author | Eric Biggers <ebiggers@google.com> | 2023-01-27 14:15:29 -0800 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2023-01-27 14:46:31 -0800 |
commit | 5d0f0e57ed900917836385527ce5b122fa1425a3 (patch) | |
tree | 2a9dd0ba1351b2783a4febe87e98754e6b8472fe /fs/buffer.c | |
parent | 245edf445c3421584f541307cd7a8cd847c3d8d7 (diff) | |
download | lwn-5d0f0e57ed900917836385527ce5b122fa1425a3.tar.gz lwn-5d0f0e57ed900917836385527ce5b122fa1425a3.zip |
fsverity: support verifying data from large folios
Try to make fs/verity/verify.c aware of large folios. This includes
making fsverity_verify_bio() support the case where the bio contains
large folios, and adding a function fsverity_verify_folio() which is the
equivalent of fsverity_verify_page().
There's no way to actually test this with large folios yet, but I've
tested that this doesn't cause any regressions.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20230127221529.299560-1-ebiggers@kernel.org
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 2e65ba2b3919..8499c79ae13d 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -308,7 +308,8 @@ static void verify_bh(struct work_struct *work) struct buffer_head *bh = ctx->bh; bool valid; - valid = fsverity_verify_blocks(bh->b_page, bh->b_size, bh_offset(bh)); + valid = fsverity_verify_blocks(page_folio(bh->b_page), bh->b_size, + bh_offset(bh)); end_buffer_async_read(bh, valid); kfree(ctx); } |