From mboxrd@z Thu Jan 1 00:00:00 1970 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 8CB76C433F5 for ; Fri, 4 Feb 2022 19:59:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4E85D6B0080; Fri, 4 Feb 2022 14:59:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F412D6B0075; Fri, 4 Feb 2022 14:59:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AFB4B6B0075; Fri, 4 Feb 2022 14:59:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id 923086B007B for ; Fri, 4 Feb 2022 14:59:04 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 535A99991A for ; Fri, 4 Feb 2022 19:59:04 +0000 (UTC) X-FDA: 79106161008.15.F4581EA Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP id 0417C40002 for ; Fri, 4 Feb 2022 19:59:03 +0000 (UTC) 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=mHFxR5NGbeSDMBxJHP5N5leN9vHaAhl5n47FMsBbbDE=; b=tgkrGRYcpNjb/Pl79jKJUaHlYZ +I42XDP52oi3pwhSa9RIE3PsYG1ORzrv+TBkXB0/cYugbP4CEaRxKOu1nYP3LOVoL0SW2An8dIp65 DcaFbZTrG0DDmx2D6rCTrtejUYDO5bRmeQg8uQmaxtr1uYMX8x1OUdKJXJS6qFRPHb08IXCi5+ImD xwxBlNFl2rtdHwtqOO6tUdS+18MIBaX6gkrv47HJAxJd5N4SRj3qWbFtRThgc1lfeLvYn5B0VG3/D YxmZNGpy+M7bQPuYQ1TjZhJnkq6px24oQfbKnutHZBpVu8AisC7hyVjiH4agHh3jLLi8VL2vd7bDo sIz/8QlA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nG4jW-007LmH-Fs; Fri, 04 Feb 2022 19:59:02 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org Subject: [PATCH 31/75] mm: Add lru_to_folio() Date: Fri, 4 Feb 2022 19:58:08 +0000 Message-Id: <20220204195852.1751729-32-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220204195852.1751729-1-willy@infradead.org> References: <20220204195852.1751729-1-willy@infradead.org> MIME-Version: 1.0 X-Rspam-User: nil X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 0417C40002 X-Stat-Signature: zrny8r4mqbdxt3tyhtouh6xjghbds99j Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=tgkrGRYc; spf=none (imf01.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1644004743-294301 Content-Transfer-Encoding: quoted-printable 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: Since page->lru occupies the same bytes as compound_head, any page on the LRU list must be a folio. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/mm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 3ca6dea4fe4a..6cb2651eccbe 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -229,6 +229,7 @@ int overcommit_policy_handler(struct ctl_table *, int= , void *, size_t *, #define PAGE_ALIGNED(addr) IS_ALIGNED((unsigned long)(addr), PAGE_SIZE) =20 #define lru_to_page(head) (list_entry((head)->prev, struct page, lru)) +#define lru_to_folio(head) (list_entry((head)->prev, struct folio, lru)) =20 void setup_initial_init_mm(void *start_code, void *end_code, void *end_data, void *brk); --=20 2.34.1