btrfs: don't clear page->mapping in btrfs_free_compressed_pages

No one ever set ->mapping on these pages, so don't bother clearing it.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Christoph Hellwig 2023-02-10 08:48:40 +01:00 committed by David Sterba
parent 32586c5bca
commit a959a1745d

View File

@ -161,12 +161,8 @@ static int compression_decompress(int type, struct list_head *ws,
static void btrfs_free_compressed_pages(struct compressed_bio *cb)
{
for (unsigned int i = 0; i < cb->nr_pages; i++) {
struct page *page = cb->compressed_pages[i];
page->mapping = NULL;
put_page(page);
}
for (unsigned int i = 0; i < cb->nr_pages; i++)
put_page(cb->compressed_pages[i]);
kfree(cb->compressed_pages);
}