diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-04-26 08:51:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-04-26 08:51:51 -0700 |
commit | c3558a6b2a75d9adacf15dd7fae79dbfffa7ebe4 (patch) | |
tree | 54988c4e9aa437a845f3fb0def3c1ccbe9360ee3 /fs/buffer.c | |
parent | dbe0e78d0e3a83dd924ea01bebf6c45313c81607 (diff) | |
parent | 04839139213cf60d4c5fc792214a08830e294ff8 (diff) | |
download | lwn-c3558a6b2a75d9adacf15dd7fae79dbfffa7ebe4.tar.gz lwn-c3558a6b2a75d9adacf15dd7fae79dbfffa7ebe4.zip |
Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux
Pull fsverity updates from Eric Biggers:
"Several cleanups and fixes for fs/verity/, including a couple minor
fixes to the changes in 6.3 that added support for Merkle tree block
sizes less than the page size"
* tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux:
fsverity: reject FS_IOC_ENABLE_VERITY on mode 3 fds
fsverity: explicitly check for buffer overflow in build_merkle_tree()
fsverity: use WARN_ON_ONCE instead of WARN_ON
fs-verity: simplify sysctls with register_sysctl()
fs/buffer.c: use b_folio for fsverity work
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 737e3eff6259..b3eb905f87d6 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -308,20 +308,19 @@ static void verify_bh(struct work_struct *work) struct buffer_head *bh = ctx->bh; bool valid; - valid = fsverity_verify_blocks(page_folio(bh->b_page), bh->b_size, - bh_offset(bh)); + valid = fsverity_verify_blocks(bh->b_folio, bh->b_size, bh_offset(bh)); end_buffer_async_read(bh, valid); kfree(ctx); } static bool need_fsverity(struct buffer_head *bh) { - struct page *page = bh->b_page; - struct inode *inode = page->mapping->host; + struct folio *folio = bh->b_folio; + struct inode *inode = folio->mapping->host; return fsverity_active(inode) && /* needed by ext4 */ - page->index < DIV_ROUND_UP(inode->i_size, PAGE_SIZE); + folio->index < DIV_ROUND_UP(inode->i_size, PAGE_SIZE); } static void decrypt_bh(struct work_struct *work) |