Re: [RFC/PATCH 4/6] memcg: shmem reclaim helper

From: Li Zefan
Date: Wed May 14 2008 - 04:24:58 EST


KAMEZAWA Hiroyuki wrote:
> On Wed, 14 May 2008 16:15:49 +0800
> Li Zefan <lizf@xxxxxxxxxxxxxx> 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.
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/