On Thu, May 04, 2017 at 06:54:58PM +0800, Fam Zheng wrote:
> On Thu, 05/04 12:36, Paolo Bonzini wrote:
> > On 04/05/2017 12:23, Stefan Hajnoczi wrote:
> > > diff --git a/include/block/aio.h b/include/block/aio.h
> > > index 406e323..5294b04 100644
> > > --- a/include/block/aio.h
> > > +++ b/include/block/aio.h
> > > @@ -456,6 +456,7 @@ static inline void aio_enable_external(AioContext 
> > > *ctx)
> > >  {
> > >      assert(ctx->external_disable_cnt > 0);
> > >      atomic_dec(&ctx->external_disable_cnt);
> 
> This can be changed to atomic_fetch_dec and only call aio_notify if it 
> returned
> 1, which is cleaner.

Nice idea.  Will send v2.

Stefan

Attachment: signature.asc
Description: PGP signature

Reply via email to