From mboxrd@z Thu Jan 1 00:00:00 1970 From: Palmer Dabbelt Subject: [PATCH 06/13] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c Date: Mon, 14 Sep 2015 15:50:40 -0700 Message-ID: <1442271047-4908-7-git-send-email-palmer@dabbelt.com> References: <1441832902-28993-1-git-send-email-palmer@dabbelt.com> <1442271047-4908-1-git-send-email-palmer@dabbelt.com> Cc: viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org Return-path: To: arnd-r2nGTMty4D4@public.gmane.org To: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Cc: ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org Cc: aishchuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org Cc: aarcange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org Cc: luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org Cc: acme-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org Cc: bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Cc: 3chas3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Cc: chris-YvXeqwSYzG2sTnJN9+BGXg@public.gmane.org Cc: dave-gkUM19QKKo4@public.gmane.org Cc: dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Cc: drysdale-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org Cc: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org Cc: geoff-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org Cc: hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org Cc: mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org Cc: iulia.manda21-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Cc: plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org Cc: jikos-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org Cc: josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org Cc: kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw@public.gmane.org Cc: mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org Cc: jcmvbkbc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Cc: paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org Cc: a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org Cc: tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org Cc: tomi.valkeinen-l0cyMroinI0@public.gmane.org Cc: vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Cc: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org Cc: Palmer Dabbelt In-Reply-To: <1442271047-4908-1-git-send-email-palmer-96lFi9zoCfxBDgjK7y7TUQ@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org This doesn't make any sense to expose to userspace, so it's been moved to the one user. This was introduced by commit 95f19f658ce1 ("epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled"). Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou --- fs/eventpoll.c | 13 +++++++++++++ include/uapi/linux/eventpoll.h | 12 ------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 1e009cad8d5c..aadee3d1931a 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1812,6 +1812,19 @@ SYSCALL_DEFINE1(epoll_create, int, size) return sys_epoll_create1(0); } +#ifdef CONFIG_PM_SLEEP +static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) +{ + if ((epev->events & EPOLLWAKEUP) && !capable(CAP_BLOCK_SUSPEND)) + epev->events &= ~EPOLLWAKEUP; +} +#else +static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) +{ + epev->events &= ~EPOLLWAKEUP; +} +#endif + /* * The following function implements the controller interface for * the eventpoll file that enables the insertion/removal/change of diff --git a/include/uapi/linux/eventpoll.h b/include/uapi/linux/eventpoll.h index bc81fb2e1f0e..7850373079ee 100644 --- a/include/uapi/linux/eventpoll.h +++ b/include/uapi/linux/eventpoll.h @@ -61,16 +61,4 @@ struct epoll_event { __u64 data; } EPOLL_PACKED; -#ifdef CONFIG_PM_SLEEP -static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) -{ - if ((epev->events & EPOLLWAKEUP) && !capable(CAP_BLOCK_SUSPEND)) - epev->events &= ~EPOLLWAKEUP; -} -#else -static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) -{ - epev->events &= ~EPOLLWAKEUP; -} -#endif #endif /* _UAPI_LINUX_EVENTPOLL_H */ -- 2.4.6