On Thu, Jun 20, 2013 at 02:30:30PM +0800, liu ping fan wrote: > On Tue, Jun 18, 2013 at 8:25 PM, Stefan Hajnoczi <stefa...@gmail.com> wrote: > > On Thu, Jun 13, 2013 at 05:03:02PM +0800, Liu Ping Fan wrote: > >> + * And flush out peer's queue. > >> + */ > >> +static void qemu_net_client_detach_flush(NetClientState *nc) > >> +{ > >> + NetClientState *peer; > >> + > >> + /* reader of self's peer field , fixme? the deleters are not > >> concurrent, > >> + * so this pair lock can save. > >> + */ > > > > Indentation, also please resolve the fixme. > > > So, here can I take the assumption that the deleters are serialized by > biglock, and remove the lock following this comment?
Ah, I understand the comment now. Is there any advantage to dropping the lock? IMO it's clearer to take the lock consistently instead of "optimizing" cases we think only get called from the main loop.