[PATCH] memcgroup: remove a useless VM_BUG_ON()

Balbir Singh balbir at linux.vnet.ibm.com
Mon Feb 18 00:12:06 PST 2008


Li Zefan wrote:
> Remove this VM_BUG_ON(), as Balbir stated:
> 
> We used to have a for loop with !list_empty() as a termination condition
> and VM_BUG_ON(!pc) is a spill over. With the new loop, VM_BUG_ON(!pc) does not
> make sense.
> 
> Signed-off-by: Li Zefan <lizf at cn.fujitsu.com>
> ---
>  mm/memcontrol.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 718acf8..631002d 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -534,7 +534,6 @@ unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
>  		if (scan >= nr_to_scan)
>  			break;
>  		page = pc->page;
> -		VM_BUG_ON(!pc);
> 
>  		if (unlikely(!PageLRU(page)))
>  			continue;

This seems much better

Acked-by: Balbir Singh <balbir at linux.vnet.ibm.com>


-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL


More information about the Containers mailing list