Commit a959a174 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David Sterba
Browse files

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: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 32586c5b
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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);
}