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

From: Paul Menage
Date: Mon Sep 08 2008 - 11:43:01 EST


On Mon, Sep 8, 2008 at 1:19 AM, Lai Jiangshan <laijs@xxxxxxxxxxxxxx> 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
--
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/