Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp805800pxb; Thu, 28 Jan 2021 00:01:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoV3VQHz4LJrA3MZlSK0fA5diT4d+mwJIBshNeJgsAOMfQbT03IeGGhCyonhaZuwM4pA7y X-Received: by 2002:a17:906:934c:: with SMTP id p12mr9710471ejw.269.1611820914633; Thu, 28 Jan 2021 00:01:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611820914; cv=none; d=google.com; s=arc-20160816; b=ZDqHgroKEaqzbQgVE75SeM0Lc6xSeN9/xrZY6LvsETzb+HuILsG60GITODCfb4xzFk n+734ZtWBY33yfj3T3sUn3smzuAWgWPjQows5ani/ibcJTfKqOImmETVQRrqtrBkzfYQ phXPYh43INVdGYdVDE0Rz+/F+1fygymmdbCgo3NfT/XpoJozkJo9WnfWXVf/qez9Ry5t wJ4ycj0gT23+BE0UpMWeeyhRWaqE3keE34x0gipd9Oi4VTI7UdDUyOhC84oq6JMdiUlC pCsrm3xvSW/DqDIwXnV3W8zvam8rekO+MzyjLcjiVkwnvtbhVdhe6PJjq6iEznFS/pEe 7t1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ML5D3QchsSfCvjh/6UQ/1m+q+OQV+91kWcgwnlcDp24=; b=TeOEjJrxH14T2GAlM6CsXGSW9EnJZqRtki/j+U3I621pxaKIa3e4PLfWUBpW0TgklM Ofqc8X4FcdhfB2v+IUO/uAB0XL8HqwLIuqsbPn6r8yUNsBiAD8xmv1nErSw3qmH/yQAl /BW7G7W1f9F5JA9DjlaDci9WrpHGwLwcgh8unohMZxDqd+B41RxRSdKsAhCvupbjVBwX 3pV8yGqyeaYbEWGBgvzyj4SUMSMdL1iCQ2YehsLnJBUE57Aagj3rN8krITSuwpEHIJM/ ABsXY74P8HS2U6x5cE6zYAENLESpj4OId5d0MDxjkFGvXWg3txnZonKNjEcModLUvt5D GOUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=gx45QSjA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si2381474edq.542.2021.01.28.00.01.30; Thu, 28 Jan 2021 00:01:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=gx45QSjA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231336AbhA1IAg (ORCPT + 99 others); Thu, 28 Jan 2021 03:00:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231441AbhA1HFi (ORCPT ); Thu, 28 Jan 2021 02:05:38 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6DF4C0617A7; Wed, 27 Jan 2021 23:04:30 -0800 (PST) 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=ML5D3QchsSfCvjh/6UQ/1m+q+OQV+91kWcgwnlcDp24=; b=gx45QSjArv+x9Uo+HOoEzmAI7N gMYtd7k9aM8T5luVbz6pSuK+K/3UYjSfOVN4qTgrhM5pWL/AEuXbQDVUca3mXqtHgPoVoFT/+g4db 2b4cJ3q2yQvNMJoeYeFR1Do2SXxJaG1TyC65HDgK8+t0C3OCqBKX2H7FcF+WdJDn3V1hjZnguc5U0 7M/w2hZmMgHpuSCr2irnkZ29tsBbwazDKpRWqua1BI71a6afnl+4RCFs2RYYB46OUAkiuRhY2NrkY D0k4/5fhwrseuAVizM/Sz2A0ASw5CgUSWlmooLjUfk46mbBktgDwjXCCuLVuCtNV4gXQ8YB7sAy7N Vh7Qo6Yw==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1l51Lt-00847n-U7; Thu, 28 Jan 2021 07:04:26 +0000 From: "Matthew Wilcox (Oracle)" To: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org Subject: [PATCH v3 12/25] mm/memcg: Add mem_cgroup_folio_lruvec Date: Thu, 28 Jan 2021 07:03:51 +0000 Message-Id: <20210128070404.1922318-13-willy@infradead.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210128070404.1922318-1-willy@infradead.org> References: <20210128070404.1922318-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mem_cgroup_page_lruvec() already expects a head page, so this will add some typesafety once we can remove mem_cgroup_page_lruvec(). Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/memcontrol.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 89aaa22506e6..ec7ecfc0e47b 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -1454,6 +1454,12 @@ static inline void lruvec_memcg_debug(struct lruvec *lruvec, struct page *page) } #endif /* CONFIG_MEMCG */ +static inline struct lruvec *mem_cgroup_folio_lruvec(struct folio *folio, + struct pglist_data *pgdat) +{ + return mem_cgroup_page_lruvec(&folio->page, pgdat); +} + static inline void __inc_lruvec_kmem_state(void *p, enum node_stat_item idx) { __mod_lruvec_kmem_state(p, idx, 1); -- 2.29.2