mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
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>
This commit is contained in:
parent
dd10ab049b
commit
874fd90caf
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue