]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fs-epoll-use-a-per-cpu-counter-for-users-watches-count-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 24 Aug 2021 00:00:00 +0000 (10:00 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:34:54 +0000 (09:34 +1000)
tweak user_epoll_alloc(), per Guenter

Link: https://lkml.kernel.org/r/20210804191421.GA1900577@roeck-us.net
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Mark Brown <broonie@kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
kernel/user.c

index 57d53568cb33c5b5414906e1083604099c5548f9..e2cf8c22b539a7ecb8f48fd6b2a5d2cd5add7e41 100644 (file)
@@ -133,8 +133,9 @@ static int user_epoll_alloc(struct user_struct *up)
 {
 #ifdef CONFIG_EPOLL
        return percpu_counter_init(&up->epoll_watches, 0, GFP_KERNEL);
-#endif
+#else
        return 0;
+#endif
 }
 
 static void user_epoll_free(struct user_struct *up)