btrfs: convert btrfs_read_merkle_tree_page() to use a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 14 Aug 2023 17:52:08 +0000 (18:52 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 13 Sep 2023 16:40:54 +0000 (18:40 +0200)
commit06ed09351b67eb1114ae106a87a0ee3ea9adb3db
tree446f1bdc227effc4435c2fc322d521d03093f333
parent5facccc9402301d67d48bef06159b91f7e41efc0
btrfs: convert btrfs_read_merkle_tree_page() to use a folio

Remove a number of hidden calls to compound_head() by using a folio
throughout.  Also follow core kernel coding style by adding the folio to
the page cache immediately after allocation instead of doing the read
first, then adding it to the page cache.  This ordering makes subsequent
readers block waiting for the first reader instead of duplicating the
work only to throw it away when they find out they lost the race.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/verity.c