[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220507115511.bfe87f9126aefad64894807e@linux-foundation.org>
Date: Sat, 7 May 2022 11:55:11 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: cgel.zte@...il.com
Cc: hughd@...gle.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Yang Yang <yang.yang29@....com.cn>,
Zeal Robot <zealci@....com.cn>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH] mm/shmem: fix build failure when
CONFIG_TRANSPARENT_HUGEPAGE is not set
On Thu, 5 May 2022 11:33:55 +0000 cgel.zte@...il.com wrote:
> From: Yang Yang <yang.yang29@....com.cn>
>
> shmem_add_to_page_cache() use THP_FILE_FALLBACK even if
> CONFIG_TRANSPARENT_HUGEPAGE is not set and triggers this
> compile error.
>
> Add ifdef CONFIG_TRANSPARENT_HUGEPAGE in shmem_add_to_page_cache().
Thanks.
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -717,10 +717,12 @@ static int shmem_add_to_page_cache(struct folio *folio,
> if (!folio_test_swapcache(folio)) {
> error = mem_cgroup_charge(folio, charge_mm, gfp);
> if (error) {
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> if (folio_test_large(folio)) {
> count_vm_event(THP_FILE_FALLBACK);
> count_vm_event(THP_FILE_FALLBACK_CHARGE);
> }
> +#endif
> goto error;
> }
> }
I believe Matthew address this in version 2 of "Folio patches for
5.19".
I'm aiming to get that (and much more!) pushed out or Monday's linux-next.
Powered by blists - more mailing lists