diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-06-25 15:27:29 +0200 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-09-27 15:27:31 +0200 |
commit | 874fd90cafdca9d678bceb88f91322af8c9a9d2d (patch) | |
tree | 92625c8ddc7c87ae7b4f89d348b7c159b5a1776e /include | |
parent | mm: Add folio_mapped() (diff) | |
download | linux-874fd90cafdca9d678bceb88f91322af8c9a9d2d.tar.xz linux-874fd90cafdca9d678bceb88f91322af8c9a9d2d.zip |
mm: Add folio_nid()
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: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 95e36d0475ac..04e41d4d85ea 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1429,6 +1429,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) { |