From patchwork Wed Aug 21 19:34:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13772017 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 CAC01C5321E for ; Wed, 21 Aug 2024 19:34:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F7B76B0191; Wed, 21 Aug 2024 15:34:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A78E6B0192; Wed, 21 Aug 2024 15:34:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E88686B0193; Wed, 21 Aug 2024 15:34:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C4F626B0191 for ; Wed, 21 Aug 2024 15:34:52 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 73174121175 for ; Wed, 21 Aug 2024 19:34:52 +0000 (UTC) X-FDA: 82477255224.24.D2037E0 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf26.hostedemail.com (Postfix) with ESMTP id B54FC140012 for ; Wed, 21 Aug 2024 19:34:50 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=aIrktxoI; spf=none (imf26.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724268810; 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=w4IRfGFkiFrrB3pF7j3Lr77Y/eA+6+Dyb/+szPk1dX8=; b=AAwkgdUeAywoMLVYTE4k+qRVMl1AIrq23GGdcA6rNXO920FB/q20fuLRvf4+ubpQjGeQZY p+lqxKHgPrttyis/IqZnajHW+ltyBb2qergFI02jyCyI32y76mYYR7qNzW/GRYfsedy3s7 AaeoKZ6XMeL/qd09UkuoFaQCxZOPriE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724268810; a=rsa-sha256; cv=none; b=Ku9W7R2ILZP73iISJaOcPtWZlobuCOTYkYGFQ4hOwKoTXZCIbTTdHMIDRySirZPwNMTpmL w1ufkEf85EJo5ro0sTZUDA1v56E91U2jQvFOKw+w4UzemiEaea2N8wTa4FvFZY8QDOudzi Knr1PbRDrgCsGGvLzHzQ1FAutOqBF1w= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=aIrktxoI; spf=none (imf26.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=w4IRfGFkiFrrB3pF7j3Lr77Y/eA+6+Dyb/+szPk1dX8=; b=aIrktxoIwlcDGpbGt35aAZG/EM 3nrAiWG+k8rQ1VBGsAzOglgpYNVayUlM0N2pPxOtaoFUNUntpMNBBwpDjf0f33ogajeNZHPjC83vu NhLUdrCxnYatOroIT1+6AdQ82tooWlFaSRwtP9A2EY1o25FmxZioC9E4DMgz9WCryABX1OzVhTIug CMkM7EmHyGj47aoMJO6mSDreAhyHMpYjcaj+7ll5DRT5dycWWQr50fRo8Hi96+rtNBGcJcI4pKWqu RNcFEeN7pOZUIxUZIQ2dyYQlqKQLQy6EAZ4WKyaYDfM+VAVOYeN7Fq2H9NWuJ5PbqRMbmqeR7t40i DNsJT++g==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgr6V-00000009cqp-1w4I; Wed, 21 Aug 2024 19:34:47 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, x86@kernel.org Subject: [PATCH 08/10] mm: Remove page_has_private() Date: Wed, 21 Aug 2024 20:34:41 +0100 Message-ID: <20240821193445.2294269-9-willy@infradead.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240821193445.2294269-1-willy@infradead.org> References: <20240821193445.2294269-1-willy@infradead.org> MIME-Version: 1.0 X-Stat-Signature: uwatupbkhypp9eypuy4ryb1nh166pa6y X-Rspamd-Queue-Id: B54FC140012 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1724268890-456116 X-HE-Meta: U2FsdGVkX19vH+li/lvSyJoL30pSwKcdr5PUTGGE6/ES9q8/xJ59p+HuiPOGBn5Z1QXEW6CHN2ZM623GaPgZEDQPXDQ0yW6o/lgCGA7vzVTHVcmFr4LrSu0Xu2HEoGtKx38WBWP3Jht1m6MApW6fHuYQcbZ4nGiuGl5wNgI2NMWFmGWnfb2mV1DKvezH8KkWQa/xiyCWuBDDhOJbrQSlYxHv7CxY0TQmE5fspVeSIrbabXPJoSoilMiTSlwlOtnXwXhQaxXKNcwDc7m9C2ZHs+oUdL+glXKajP1luUzdYBbR2Xtn8RqKj5xMg5BJrP9dWe+II/1qLDEtt1I/es0w0G3Hw7u1TZTTfnMazNkFW6hsrcOdr5y3BzVoV4mccMMeoIPrxyYPV3KqVSlh2u47gQbxTnBAXiEC4c+fmVci4RXhcDOXBWWUAfXHcrFPjHEKWc5DTlPvIdGz9eWxXCADb1L64qNjhCfX+IiSuTt79Q2jV7mXkBJxZBTI+Q5xl/TA/2bBEycm5lVVJSWYYMpbAKZqzIfwlIsYLjC3bvGxjzxU/uch3jWxADw5i1w5wTKR0pEK4kDM62oHdzMAifFNMjE+B8I7yzG2itKwaN6fbqiClLhnz/iXG0A+KB6Jl+qtwxK/V0nW2WjBZ+oCBWTIogW07i1Iqhrz8UEtjAI/cpCY95iO+it/aeX8T/TQFW9zPdrWbNhrgRv0RLs5qB/9QIBBuSoZlHdgUzh5LpbbU7GSGxYjfRaq82QawH74SMEoJl0DkSeEBXNaTh+IRCafIbx8zK4oRd4SidLib2ghpRIJP1niUa3krlJCaUPCbjYnxXpJGuDjT/uXSknIXczrsGPFS0V//rLOv3VyrW66WYxb3XadKAXOAZYKVI8osJ69WtuxfsABXrUYzFW6YCw2aQY5wyYr0A0LFYpyy6Jf4oUJ01I4tt8ZSoPkNzVZDHqkw1E6hTTGpY54dTA+a/s fhzpgPY6 cbvbO1XC1leQM3vuoUFqSKw+kzZf9Upct6g00vGsxtxcfk0EYdJXLxMSi2TvkjHUCt9l5mycPc02Lptbr9cetSHbPuYCdHtjmXQjmh9breYIcY6qCyuZN2vZzzaBKBMb0Fq+AC1CLsxiu/NjujWjle3XRNk+ubDtI3j/AzInbEJ4DU/tjPvyvYiHuMvQpE8JDwyfSN1ia7B+uFtkLUON9HEbVr2T9sv516bayvi0/sscnyDqqLpTImdRn+gV+lqsFzss6 X-Bogosity: Ham, tests=bogofilter, spamicity=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: This function has no more callers, except folio_has_private(). Combine the two functions. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/page-flags.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 5112049cc102..3513aa666c31 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -1175,20 +1175,15 @@ static __always_inline void __ClearPageAnonExclusive(struct page *page) #define PAGE_FLAGS_PRIVATE \ (1UL << PG_private | 1UL << PG_private_2) /** - * page_has_private - Determine if page has private stuff - * @page: The page to be checked + * folio_has_private - Determine if folio has private stuff + * @folio: The folio to be checked * - * Determine if a page has private stuff, indicating that release routines + * Determine if a folio has private stuff, indicating that release routines * should be invoked upon it. */ -static inline int page_has_private(const struct page *page) +static inline int folio_has_private(const struct folio *folio) { - return !!(page->flags & PAGE_FLAGS_PRIVATE); -} - -static inline bool folio_has_private(const struct folio *folio) -{ - return page_has_private(&folio->page); + return !!(folio->flags & PAGE_FLAGS_PRIVATE); } #undef PF_ANY