From patchwork Fri Jun 21 05:46:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexs@kernel.org X-Patchwork-Id: 13706858 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B27E0C2BA1A for ; Fri, 21 Jun 2024 05:42:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7E2928D012D; Fri, 21 Jun 2024 01:42:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 743708D012C; Fri, 21 Jun 2024 01:42:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D2BE8D012D; Fri, 21 Jun 2024 01:42:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id E6CBF8D012C for ; Fri, 21 Jun 2024 01:42:18 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A63CCA092E for ; Fri, 21 Jun 2024 05:42:18 +0000 (UTC) X-FDA: 82253800356.11.39C1240 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf27.hostedemail.com (Postfix) with ESMTP id 9C88440018 for ; Fri, 21 Jun 2024 05:42:16 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=H8XjtS0m; spf=pass (imf27.hostedemail.com: domain of alexs@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=alexs@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718948529; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=K/mzSlN4QsMDDkd9D4ih1IJ37E6eyAW7SgQimZrJMU4=; b=CCIM+o2om0mi9H4AlCPnUDB8eCPOpcXm611wCezVAD0zc1kcfx045t06Dwz5oOIoroj872 YAXXIhwpNA8KB5HWJYCDyojmpoTLx87pScaTQtOvgtVHvHVexn1uKJYdu+NFMQViM/MYLv 6f7TpPgXLLG0P7kSRAb/bhfCxcQ9xkU= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=H8XjtS0m; spf=pass (imf27.hostedemail.com: domain of alexs@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=alexs@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718948529; a=rsa-sha256; cv=none; b=UXR27kiqnAY6C86G2UDuEhrAn0789Rf0J+jI2BYRznlCQS//4x4DbleZdzpyeCg8Xj4CXm xMVNTLYA2kXf4BWqh3UznZ+9+mEhFanmLOFzSDuSSMVkwJ5u7qaHMnyVpR/DAiy636dGK3 nZRQCs9nymSwU7q/KYOm5dy6+CxoNOQ= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id DAB15CE2B4E; Fri, 21 Jun 2024 05:42:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A606C4AF0A; Fri, 21 Jun 2024 05:42:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718948533; bh=dd2siZgce72Js9rHx7j82fOPcgkDkcIWKh0L5w1zff0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H8XjtS0m/7b+Fl85MJhkqBpvIGisLhL2bxGmCQxv2/ny81+Fq+AeD8U9d5RFc0ya4 S2TcuJm+gq+e9lJNLM8l9DgeOhGkYTTLL+S174+ntE4pAv6fK6kU3ELimUhyYCzSzo ZCIG+yI3q4l/Mu7uLRo8kAeYWwWUCZBqfvyC+i791Um2NAbykq+FsKHkvzxo/JY3bU 62T0zsgRdnWgftCddh08lv2ApsH/JcLvdqoZBzbWQHvrZDRSdjjWFJypgPs+95Altm ASoDaRp5K5LT9x51YgLFcUZ3D4Hks6T5n0LWikFXdOKm74gG9w+rt71Qb2vmxRA3PL hTWBId8cGCb0w== From: alexs@kernel.org To: Vitaly Wool , Miaohe Lin , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, minchan@kernel.org, willy@infradead.org, senozhatsky@chromium.org, david@redhat.com, 42.hyeyoo@gmail.com Cc: Alex Shi Subject: [PATCH 03/15] mm/z3fold: use zpdesc in z3fold_page_putback Date: Fri, 21 Jun 2024 13:46:43 +0800 Message-ID: <20240621054658.1220796-4-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240621054658.1220796-1-alexs@kernel.org> References: <20240621054658.1220796-1-alexs@kernel.org> MIME-Version: 1.0 X-Stat-Signature: iof9udbcrgxq5hhxrok5am1y9jzfdwwm X-Rspam-User: X-Rspamd-Queue-Id: 9C88440018 X-Rspamd-Server: rspam02 X-HE-Tag: 1718948536-1105 X-HE-Meta: U2FsdGVkX19W0ti3f5Yp3ZArim6aMppXOBNcRFKEFH3n0BnpydcQ0ewQog2LKHILSKx5JiWA0xN83a13JtC2DoCVZ9Kx9syFT2h4fOoaMqWVv6bXuSdbXyZIX6ltFAHCZ1MmcyC8hq4HBc6kemJ3DUbmc3lDmZsUErdrGoku0si7Trcp2gCHW92vOcHnMBjShfNPvoZ8pSGPKAVW1NGoXuBAJoea4dNB+G8ExTJYF1J7Wg93J2+/d/spUR5RWnZvrGIgqtbeTN4rXNbIRt3Wnm/GjMECOjOx7VtbGTfb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ity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Alex Shi Convert page to zpdesc in z3fold_page_putback function, and keep the 'page' parameter since the function hooks to page_putback, which is used by other users. Signed-off-by: Alex Shi --- mm/z3fold.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index b7f86c1b57a3..5cb156fc03be 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -1350,8 +1350,9 @@ static void z3fold_page_putback(struct page *page) { struct z3fold_header *zhdr; struct z3fold_pool *pool; + struct zpdesc *zpdesc = page_zpdesc(page); - zhdr = page_address(page); + zhdr = zpdesc_address(zpdesc); pool = zhdr_to_pool(zhdr); z3fold_page_lock(zhdr); @@ -1362,7 +1363,7 @@ static void z3fold_page_putback(struct page *page) return; if (list_empty(&zhdr->buddy)) add_to_unbuddied(pool, zhdr); - clear_bit(PAGE_CLAIMED, &page->private); + clear_bit(PAGE_CLAIMED, &zpdesc->zppage_flag); z3fold_page_unlock(zhdr); }