[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220204195852.1751729-14-willy@infradead.org>
Date: Fri, 4 Feb 2022 19:57:50 +0000
From: "Matthew Wilcox (Oracle)" <willy@...radead.org>
To: linux-mm@...ck.org
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
linux-kernel@...r.kernel.org, Christoph Hellwig <hch@....de>,
John Hubbard <jhubbard@...dia.com>,
Jason Gunthorpe <jgg@...dia.com>,
William Kucharski <william.kucharski@...cle.com>
Subject: [PATCH 13/75] mm: Add folio_pincount_ptr()
This is the folio equivalent of compound_pincount_ptr().
Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
Reviewed-by: Christoph Hellwig <hch@....de>
Reviewed-by: John Hubbard <jhubbard@...dia.com>
Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
Reviewed-by: William Kucharski <william.kucharski@...cle.com>
---
include/linux/mm.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index dd7d6e95e43b..d5f0f2cfd552 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -891,6 +891,11 @@ static inline void destroy_compound_page(struct page *page)
compound_page_dtors[page[1].compound_dtor](page);
}
+static inline atomic_t *folio_pincount_ptr(struct folio *folio)
+{
+ return &folio_page(folio, 1)->compound_pincount;
+}
+
static inline int head_compound_pincount(struct page *head)
{
return atomic_read(compound_pincount_ptr(head));
--
2.34.1
Powered by blists - more mailing lists