Thread (389 messages) 389 messages, 13 authors, 2021-08-21

Re: [PATCH v14 033/138] mm: Add folio_nid()

From: Vlastimil Babka <hidden>
Date: 2021-08-11 09:37:14
Also in: linux-fsdevel, lkml

On 7/15/21 5:35 AM, Matthew Wilcox (Oracle) wrote:
This is the folio equivalent of page_to_nid().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Vlastimil Babka <redacted>
quoted hunk ↗ jump to hunk
---
 include/linux/mm.h | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 8b79d9dfa6cb..c6e2a1682a6d 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1428,6 +1428,11 @@ static inline int page_to_nid(const struct page *page)
 }
 #endif
 
+static inline int folio_nid(const struct folio *folio)
+{
+	return page_to_nid(&folio->page);
+}
+
 #ifdef CONFIG_NUMA_BALANCING
 static inline int cpu_pid_to_cpupid(int cpu, int pid)
 {
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help