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

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
...@@ -161,12 +161,8 @@ static int compression_decompress(int type, struct list_head *ws, ...@@ -161,12 +161,8 @@ static int compression_decompress(int type, struct list_head *ws,
static void btrfs_free_compressed_pages(struct compressed_bio *cb) static void btrfs_free_compressed_pages(struct compressed_bio *cb)
{ {
for (unsigned int i = 0; i < cb->nr_pages; i++) { for (unsigned int i = 0; i < cb->nr_pages; i++)
struct page *page = cb->compressed_pages[i]; put_page(cb->compressed_pages[i]);
page->mapping = NULL;
put_page(page);
}
kfree(cb->compressed_pages); kfree(cb->compressed_pages);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment