OpenVZ Forum


Home » Mailing lists » Devel » Re: [PATCH 2/3] memcgroup: fix typo in VM_BUG_ON()
Re: [PATCH 2/3] memcgroup: fix typo in VM_BUG_ON() [message #27436] Mon, 18 February 2008 06:39
yamamoto is currently offline  yamamoto
Messages: 97
Registered: July 2007
Member
> No need for VM_BUG_ON(pc), since 'pc' is the list entry. This should
> be VM_BUG_ON(page).
> 
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> ---
>  mm/memcontrol.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 6bded84..c2959ee 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -534,7 +534,7 @@ unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
>  		if (scan >= nr_to_scan)
>  			break;
>  		page = pc->page;
> -		VM_BUG_ON(!pc);
> +		VM_BUG_ON(!page);

can't page be NULL here if mem_cgroup_uncharge clears pc->page behind us?
ie. bug.

YAMAMOTO Takashi
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Previous Topic: Re: [PATCH 3/3] memcgroup: return negative error code in mem_cgroup_create()
Next Topic: Re: [PATCH 2/3] memcgroup: fix typo in VM_BUG_ON()
Goto Forum:
  


Current Time: Wed Aug 27 16:30:46 GMT 2025

Total time taken to generate the page: 0.16289 seconds