[Devel] Re: Re: [PATCH] cgroup(fix critical bug): new handling for tasks file

Paul Menage menage at google.com
Mon Sep 8 08:42:43 PDT 2008


On Mon, Sep 8, 2008 at 1:19 AM, Lai Jiangshan <laijs at cn.fujitsu.com> wrote:
>
>> +             while (index < end) {
>> +                     int mid = (index + end) / 2;
>> +                     if (cgrp->tasks_pids[mid] == pid) {
>> +                             index = mid;
>> +                             break;
>> +                     } else if (cgrp->tasks_pids[mid] <= pid)
>
> (cgrp->tasks_pids[mid] <= pid) ===> (cgrp->tasks_pids[mid] < pid)

Given the "if" test directly above, those two are equivalent.

Paul
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list