On Fri, Jul 6, 2012 at 6:13 PM, Christoph Hellwig <[email protected]> wrote:
>> +static void clear_client(struct client_info *ci)
>> +{
>> + if (!list_empty(&ci->conn.blocking_siblings))
>> + list_del_init(&ci->conn.blocking_siblings);
>> +
>> + unregister_event(ci->conn.fd);
>
> Is a double unregister-event fine? It seems like we don't protect
> against that here.
I think it's no harm, unregister_event will call lookup_event() to check it.
>
>> static void client_decref(struct client_info *ci)
>> {
>> - if (ci && --ci->refcnt == 0)
>> - destroy_client(ci);
>> + if (ci)
>> + ci->refcnt--;
>
> It seems like client_incref / client_decref should just go away,
> they contain an unneeded NULL check and otherwise just do a trivial
> -- / ++ operation and only have a singler caller each.
Right, I can drop these two functions if these series have not other problem.
>
--
Yunkai Zhang
Work at Taobao
--
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog