From patchwork Mon Aug 19 01:20:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 13767708 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3F94C531DF for ; Mon, 19 Aug 2024 01:21:07 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sfr50-0000Oh-JE; Mon, 19 Aug 2024 01:21:07 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sfr4z-0000OW-EQ for linux-f2fs-devel@lists.sourceforge.net; Mon, 19 Aug 2024 01:21:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; 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:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4GknH1Zwi0GWeOzSpYsC4QgaC/LmZ0emVEef2dI0udw=; b=cZxc+VtRFpCAUVKkFqFKsV7o4v NZEcS8L/JkO/TInPTdyRP4YTT74VnidfDDjz/fwXS31h5g1M2sdKKaZuuKK1/ftR0xyx8DhDqYf0u 8Kyjrvyb3FL1u24R9qAKsGFdVD4m3D0Hzyr3F7u0rxl2oQaFl1dAtwP58vxeCJVOWaAA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; 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:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=4GknH1Zwi0GWeOzSpYsC4QgaC/LmZ0emVEef2dI0udw=; b=D+Rd9C4k7AZrRJf2yiXThlZ1SN x1Nw17zUmOYlCriuiz1w2VRMdJx4ACWfhNLO1nTo1wxN1HZ1njqLhDMHNPOvdwT6i/St8NfaZLn1S Q0biFm52NhuLECxpgyWCmNOujddwDqIHpJ5MzrRNrQdnepZCzs1OhxtcPwM8RH/4lAN4=; Received: from sin.source.kernel.org ([145.40.73.55]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1sfr4z-0003ZV-Cg for linux-f2fs-devel@lists.sourceforge.net; Mon, 19 Aug 2024 01:21:06 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 98C8DCE0924; Mon, 19 Aug 2024 01:20:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C38CCC4AF11; Mon, 19 Aug 2024 01:20:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724030458; bh=7JJv4KN9xSbK50goC7fnEuayXM2V2u/CfyhdMECGBOI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YDSTLN8Bf6nJClcVrX60OF1bPPfs1Ggx/9YQdIxonAzMUd0zyl6KTJLTRtOT/G/Ch 7UoZA9KlTuDrY5Ovp17c69RPbQmRwctWYXKKYAiNnl/RgIGQR5RcBYNZXpR/ZQDRc6 7qQwV5jzRW67slq1g+dE7xtYcs/h0A61IEjOfoDU2CJtH2ywsjxb0gcih8NH1Q6WxP 40CPCS7AxT/pPod4/rnqXfN9ta5CWRmxR9ner5FhtSp7tKsZWgIIP3D2GzNf51erVa I+F6P4dW27rJ/e0kciVmV+MHiHt6IrfsDggFv1/c5s7pbTcu/hhC/YOKbfOB0hzHxy dbUOxc5yLQiZw== From: Chao Yu To: jaegeuk@kernel.org Date: Mon, 19 Aug 2024 09:20:18 +0800 Message-Id: <20240819012023.3871272-3-chao@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240819012023.3871272-1-chao@kernel.org> References: <20240819012023.3871272-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1sfr4z-0003ZV-Cg Subject: [f2fs-dev] [PATCH 3/8] f2fs: convert f2fs_set_compressed_page() to use folio X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Matthew Wilcox , linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Convert to use folio, so that we can get rid of 'page->index' to prepare for removal of 'index' field in structure page [1]. [1] https://lore.kernel.org/all/Zp8fgUSIBGQ1TN0D@casper.infradead.org/ Cc: Matthew Wilcox Signed-off-by: Chao Yu --- fs/f2fs/compress.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 82c31641e696..67bb1e2e07a4 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -90,11 +90,13 @@ bool f2fs_is_compressed_page(struct page *page) static void f2fs_set_compressed_page(struct page *page, struct inode *inode, pgoff_t index, void *data) { - attach_page_private(page, (void *)data); + struct folio *folio = page_folio(page); + + folio_attach_private(folio, (void *)data); /* i_crypto_info and iv index */ - page->index = index; - page->mapping = inode->i_mapping; + folio->index = index; + folio->mapping = inode->i_mapping; } static void f2fs_drop_rpages(struct compress_ctx *cc, int len, bool unlock)