]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: consolidate fsverity_info lookup
authorChristoph Hellwig <hch@lst.de>
Mon, 2 Feb 2026 06:06:39 +0000 (07:06 +0100)
committerEric Biggers <ebiggers@kernel.org>
Wed, 4 Feb 2026 19:31:54 +0000 (11:31 -0800)
commitb0160e4501bb3572d9ef6e4f8edf758193ee37aa
tree26dd8d6a446a1d6ab986d41240d1e749920361b7
parent45dcb3ac9832650e5fdc2046cc7cdb97cebbb888
btrfs: consolidate fsverity_info lookup

Look up the fsverity_info once in btrfs_do_readpage, and then use it
for all operations performed there, and do the same in end_folio_read
for all folios processed there.  The latter is also changed to derive
the inode from the btrfs_bio - while bbio->inode is optional, it is
always set for buffered reads.

This amortizes the lookup better once it becomes less efficient.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David Sterba <dsterba@suse.com>
Link: https://lore.kernel.org/r/20260202060754.270269-11-hch@lst.de
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
fs/btrfs/extent_io.c