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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>

Acked-by: Vlastimil Babka <vbabka@xxxxxxx>

> ---
>  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)
>  {
> 




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux