From patchwork Fri Feb 24 23:25:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 13151857 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EEA693D8F for ; Fri, 24 Feb 2023 23:25:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9D87C4339B; Fri, 24 Feb 2023 23:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677281135; bh=6luuhQSD+ajKK9CmlBCDc0zCfnP0G4oE/imS8DvMI7Q=; h=From:To:Cc:Subject:Date:From; b=FxQD/uarTwtsPK8dN6rJwN9Kdc+VPPP69xqTmxUP1bflotxYLCgY1MMeRyAOLlH9g G9mSP2Ec7MFBtXzG3v61l/gN31EX5QFuK8f577eQvpo1W+XwAGeDPV3/QkIvXoikIb 6pOxpOsW8S9aTzsj2w03RTk2yKHNugqqUt/QA1krgnGtcgMkeadAQifuFMkmLGU/HZ xE7G3lE6AxZFAADc3OIzlVatx0NJ/f4pAGHY+9r6LDvjgFdYvFY4w+pZfjy1uQl5Qh ePd0oVsAij3G62irSRPN6dcqTQjIU1f7ZvQbPJnyWqihJ3DLRM/4AXl/696TUTkQxs +8G+Vwgf38/WQ== From: Eric Biggers To: fsverity@lists.linux.dev Cc: linux-ext4@vger.kernel.org, Matthew Wilcox Subject: [PATCH] fs/buffer.c: use b_folio for fsverity work Date: Fri, 24 Feb 2023 15:25:30 -0800 Message-Id: <20230224232530.98440-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: fsverity@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Eric Biggers Use b_folio now that it exists. This removes an unnecessary call to compound_head(). No actual change in behavior. Signed-off-by: Eric Biggers --- fs/buffer.c | 9 ++++----- 1 file 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)