Re: [PATCH] kpageflags: respect folio head-page flag placement

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

 



On Wed, Oct 25, 2023 at 04:12:37PM -0400, Gregory Price wrote:
> +++ b/fs/proc/page.c
> @@ -188,20 +188,31 @@ u64 stable_page_flags(struct page *page)
>  		u |= 1 << KPF_SLAB;
>  
>  	u |= kpf_copy_bit(k, KPF_ERROR,		PG_error);
> -	u |= kpf_copy_bit(k, KPF_DIRTY,		PG_dirty);
> +
> +	if (PageDirty(page))
> +		u |= 1 << KPF_DIRTY;

This is not the way to do it.

At the beginning of the function, add:

	struct folio *folio = page_folio(page);

Then use folio_test_XXX istead of PageXXX().





[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