diff mbox series

[7/8] btrfs: don't clear ->mapping in btrfs_free_compressed_pages

Message ID 20230210074841.628201-8-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/8] btrfs: embedded a btrfs_bio into struct compressed_bio | expand

Commit Message

Christoph Hellwig Feb. 10, 2023, 7:48 a.m. UTC
No one ever set ->mapping on these pages, so don't bother clearing it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/btrfs/compression.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index ac9ffec5fc925d..0bbaccb1787080 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -163,12 +163,8 @@  static void btrfs_free_compressed_pages(struct compressed_bio *cb)
 {
 	unsigned int i;
 
-	for (i = 0; i < cb->nr_pages; i++) {
-		struct page *page = cb->compressed_pages[i];
-
-		page->mapping = NULL;
-		put_page(page);
-	}
+	for (i = 0; i < cb->nr_pages; i++)
+		put_page(cb->compressed_pages[i]);
 	kfree(cb->compressed_pages);
 }