lkml.org 
[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] hugetlb: fix CONFIG_CGROUP_HUGETLB ifdefs
On Fri, Feb 14, 2020 at 12:46 PM Mina Almasry <almasrymina@google.com> wrote:
>
> Fixes an #ifdef bug in the patch referred to below that was
> causing a build error when CONFIG_DEBUG_VM &&
> !CONFIG_CCGROUP_HUGETLB.
>
> Fixes: b5f16a533ce8a ("hugetlb: support file_region coalescing again")
> Signed-off-by: Mina Almasry <almasrymina@google.com>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Greg Thelen <gthelen@google.com>
> Cc: Mike Kravetz <mike.kravetz@oracle.com>
> Cc: Shakeel Butt <shakeelb@google.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> mm/hugetlb.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index ee6d262fe6ac0..95d34c58981d2 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -289,7 +289,7 @@ static bool has_same_uncharge_info(struct file_region *rg,
> #endif
> }
>
> -#ifdef CONFIG_DEBUG_VM
> +#if defined(CONFIG_DEBUG_VM) && defined(CONFIG_CGROUP_HUGETLB)
> static void dump_resv_map(struct resv_map *resv)
> {
> struct list_head *head = &resv->regions;
> @@ -325,6 +325,10 @@ static void check_coalesce_bug(struct resv_map *resv)
> }
> }
> }
> +#else
> +static void check_coalesce_bug(struct resv_map *resv)
> +{
> +}
> #endif
>
> static void coalesce_file_region(struct resv_map *resv, struct file_region *rg)
> @@ -431,9 +435,7 @@ static long add_reservation_in_range(struct resv_map *resv, long f, long t,
> }
>
> VM_BUG_ON(add < 0);
> -#ifdef CONFIG_DEBUG_VM
> check_coalesce_bug(resv);
> -#endif
> return add;
> }
>
> --
> 2.25.0.265.gbab2e86ba0-goog

\
 
 \ /
  Last update: 2020-02-14 22:01    [W:0.087 / U:5.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site