Re: [Patch] Convert max_user_watches to long.

From: Davide Libenzi
Date: Mon Oct 11 2010 - 00:50:28 EST


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?


- Davide


--
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/