Re: [PATCH -mm][AIO] AIO completion signal notification fixes and cleanups

Sébastien Dugué
2007-02-06T11:41:10Z

On Tue, 6 Feb 2007 14:05:39 +0300 Oleg Nesterov <oleg@tv-sign.ru> wrote:

> On 02/06, S?bastien Dugu? wrote:
> >
> > @@ -970,8 +969,14 @@ static long aio_setup_sigevent(struct ai
> > rcu_read_lock();
> > target = sigevent_find_task(&event);
> >
> > - if (unlikely(!target))
> > + if (unlikely(!target)) {
> > + /*
> > + * Revert notify to SIGEV_NONE so that really_put_req()
> > + * knows that no ref has been taken on a task.
> > + */
> > + notify->notify = SIGEV_NONE;
> > goto out_unlock;
> > + }
>
> Very minor nit, feel free to ignore.
>
> Isn't it better to move "notify->* = event.*;" down, when we know that
> target != NULL. Imho, a bit easier to follow. This way we don't need to
> reset notify->notify = SIGEV_NONE.
>
> aio_setup_sigevent() relies on the fact that ->notify = SIGEV_NONE on
> entry anyway.

Yep, right, it will make things cleaner.

Thanks,

Sébastien.