On Tue, Sep 9, 2008 at 7:18 PM, Lai Jiangshan <laijs@cn.fujitsu.com> wrote:
Maybe it would be better to do:
if (!memcmp(...) && kref_get_not_zero(&cg->ref))
return cg;
so that in the event of a race, we carry on looking in the array.
Probably clearer to have a bool return type.
Paul
--