lkml.org 
[lkml]   [2008]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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    [W:0.062 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site