Re: [Patch] Convert max_user_watches to long.

From: Robin Holt
Date: Thu Oct 14 2010 - 13:15:18 EST


On Sun, Oct 10, 2010 at 09:49:58PM -0700, Davide Libenzi wrote:
> On Sat, 9 Oct 2010, Robin Holt wrote:
>
> > @@ -900,11 +902,12 @@ static int ep_insert(struct eventpoll *e
> > {
> > int error, revents, pwake = 0;
> > unsigned long flags;
> > + long user_watches;
> > struct epitem *epi;
> > struct ep_pqueue epq;
> >
> > - if (unlikely(atomic_read(&ep->user->epoll_watches) >=
> > - max_user_watches))
> > + user_watches = atomic_long_read(&ep->user->epoll_watches);
> > + if (user_watches >= max_user_watches)
> > return -ENOSPC;
>
> Is there a particular reason for adding an extra, otherwise unused,
> user_watches variable?

Keeps the line length and readability complaints down. No other
reason.

Robin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/