[sheepdog] [PATCH] sheep: reinitialize conn->blocking_siblings after delete it
Yunkai Zhang
yunkai.me at gmail.com
Thu Jun 28 10:00:22 CEST 2012
On Thu, Jun 28, 2012 at 3:05 PM, Liu Yuan <namei.unix at gmail.com> wrote:
> On 06/28/2012 11:54 AM, Yunkai Zhang wrote:
>> if (!list_empty(&ci->conn.blocking_siblings))
>
> I don't think list_empty(entry) is valid check. Looks weird to me,
> list_empty() is used to check if list is empty, not entry. It seems that
> list.h doesn't provide helper to check if entry is in the list. We
> should use other filed to check or provide a new dedicated helper.
I don't think so. Each _ENTRY_ of double-linked circular list has the
same attributes. There are no differences between _HEAD_ and other
entries. We can treat each _ENTRY_ as another _HEAD_, so why can't we
use list_emtpy() to check it as long as we do the prepare work
correctly?
>
> Thanks,
> Yuan
>
--
Yunkai Zhang
Work at Taobao
More information about the sheepdog
mailing list