summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2023-02-24 15:25:30 -0800
committerEric Biggers <ebiggers@google.com>2023-03-27 21:17:02 -0700
commit8b7d3fe96881e0f13c0176812b40432558882023 (patch)
treee35ed5b8edfde1e9ad07f685e752b82f7b646010
parent197b6b60ae7bc51dd0814953c562833143b292aa (diff)
downloadlinux-starfive-8b7d3fe96881e0f13c0176812b40432558882023.tar.gz
linux-starfive-8b7d3fe96881e0f13c0176812b40432558882023.tar.bz2
linux-starfive-8b7d3fe96881e0f13c0176812b40432558882023.zip
fs/buffer.c: use b_folio for fsverity work
Use b_folio now that it exists. This removes an unnecessary call to compound_head(). No actual change in behavior. Link: https://lore.kernel.org/r/20230224232530.98440-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com>
-rw-r--r--fs/buffer.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 9e1e2add541e..034bece27163 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)