lkml.org 
[lkml]   [2008]   [May]   [14]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 14 May 2008 16:23:09 +0800
FromLi Zefan <>
SubjectRe: [RFC/PATCH 4/6] memcg: shmem reclaim helper
KAMEZAWA Hiroyuki wrote:
> On Wed, 14 May 2008 16:15:49 +0800> Li Zefan <lizf@cn.fujitsu.com> wrote:
> 
>>> +	while(!progress && --retry) {
>>> +		progress = try_to_free_mem_cgroup_pages(mem, gfp_mask);
>>> +	}>> This is wrong. How about:>> 	do {
>> 		...
>> 	} while (!progress && --retry);
>>
> Ouch, or retry--....
> 

retry-- is still wrong, because then after while, retry will be -1, and then:

+	if (!retry)
+		return -ENOMEM;
> Thank you for catching.> 



\
 
 \ /
  Last update: 2008-05-14 10:27    [from the cache]
©2003-2008