From patchwork Fri Feb 10 07:48:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13135449 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AEDFC05027 for ; Fri, 10 Feb 2023 07:49:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231485AbjBJHtU (ORCPT ); Fri, 10 Feb 2023 02:49:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231220AbjBJHtT (ORCPT ); Fri, 10 Feb 2023 02:49:19 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE3975BA4C for ; Thu, 9 Feb 2023 23:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=nRQzHXVdAE2z6gRk9SiR8xCZNuD8sOy/blzfWqL2nek=; b=Xin0iZXDTeTtysN7XPpVfrn23O gFQY3lhhnZOi0/6bNllQyDhdxcvenNaSc7bEejHxIrtY32e9rLLq8cqZxj2btkFTStCG1lfpUkV/j PPxfokg8qO1cN4TbES9aB/v7BA8c2GvMrDp0qDbc9NZT3Jg5rftmgxPqdL/FdvsNF1TQrwUG/ESnS UYMFKkjhjgukCPpDViG9gpy1BOd8gGINyC/fY0uroOYM3FeG5IZdddaIKRF/aHk2zjSIaBrV3eR6v q2NdkGWepe73S+OpH6qEr+Wkec92YjG46iqXPJL/sPZ29qtvUubwk3cQzyev9Qh6QkWdTa9xWiHIL hdQ7vDWg==; Received: from 213-147-164-133.nat.highway.webapn.at ([213.147.164.133] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQO9k-004fiy-Hc; Fri, 10 Feb 2023 07:49:17 +0000 From: Christoph Hellwig To: Chris Mason , Josef Bacik , David Sterba Cc: linux-btrfs@vger.kernel.org Subject: [PATCH 7/8] btrfs: don't clear ->mapping in btrfs_free_compressed_pages Date: Fri, 10 Feb 2023 08:48:40 +0100 Message-Id: <20230210074841.628201-8-hch@lst.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210074841.628201-1-hch@lst.de> References: <20230210074841.628201-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org No one ever set ->mapping on these pages, so don't bother clearing it. Signed-off-by: Christoph Hellwig --- fs/btrfs/compression.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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); }