diff options
author | Christoph Hellwig <hch@lst.de> | 2023-02-10 10:48:40 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-04-17 19:01:15 +0300 |
commit | a959a1745d333fbce1e21895ac6d833a77213112 (patch) | |
tree | aae9b8bc57a3ca601dfcc38b0862a6d78d417389 /fs/btrfs/compression.c | |
parent | 32586c5bca72bfd2875f0c66032e134ce1c68680 (diff) | |
download | linux-a959a1745d333fbce1e21895ac6d833a77213112.tar.xz |
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>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 5f64a775f1fd..6a23d6cc29aa 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -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); } |