Re: [PATCH 02/17] mm: Add folio_pincount_available()

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

 



On Sun, Jan 02, 2022 at 09:57:14PM +0000, Matthew Wilcox (Oracle) wrote:
> -static inline bool hpage_pincount_available(struct page *page)
> +static inline bool folio_pincount_available(struct folio *folio)
>  {
>  	/*
> -	 * Can the page->hpage_pinned_refcount field be used? That field is in
> +	 * Can the folio->hpage_pinned_refcount field be used? That field is in
>  	 * the 3rd page of the compound page, so the smallest (2-page) compound
>  	 * pages cannot support it.
>  	 */
> +	return folio_order(folio) > 1;
> +}

Maybe convert the comment into a kerneldoc one?

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux