fs/epoll: use a per-cpu counter for user's watches count
[linux-2.6-microblaze.git] / include / linux / sched / user.h
index 2462f7d..00ed419 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <linux/uidgid.h>
 #include <linux/atomic.h>
+#include <linux/percpu_counter.h>
 #include <linux/refcount.h>
 #include <linux/ratelimit.h>
 
@@ -13,7 +14,7 @@
 struct user_struct {
        refcount_t __count;     /* reference count */
 #ifdef CONFIG_EPOLL
-       atomic_long_t epoll_watches; /* The number of file descriptors currently watched */
+       struct percpu_counter epoll_watches; /* The number of file descriptors currently watched */
 #endif
        unsigned long unix_inflight;    /* How many files in flight in unix sockets */
        atomic_long_t pipe_bufs;  /* how many pages are allocated in pipe buffers */