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 |
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); }
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(-)