Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1261833

[PATCH 06/13] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Palmer Dabbelt <palmer@dabbelt.com>
Newsgroups linux.kernel
Subject [PATCH 06/13] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c
Date Tue, 03 Nov 2015 21:00:03 +0100
Message-ID <qqPUn-79Z-27@gated-at.bofh.it> (permalink)
References <q8KT7-3i1-3@gated-at.bofh.it> <qqPKG-76u-7@gated-at.bofh.it>
X-Original-To arnd@arndb.de
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt_com.20150623.gappssmtp.com; s=20150623; h=from:to:to:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:subject :date:message-id:in-reply-to:references; bh=QWkURjQ1o5S0L8K3AEw25sz7BSvYt54bsQT51JV+/k8=; b=reyTGvx3B38lLW4mGzN34M4Z0qy6YSJjsP32a7DT5beNq3Se/X+hgOWUeyrQB3uCCs XYob7fbCcrrWzdSt02Dt6SCfvLDhmnxXWoY31gA9zMSF4hW1o5Bj9ZhV4gnZ9qrIYOzi ltf4mlcRpaA0PDUYHq+z2a7INAag9Cs6ud2gE6uF0Hhop07adH2CslZj3QH07rFPbyny 7sOiWgkwpcxKzHK25FHqwsfM38wbjjs6b7TZx6OUUt2vJD7EQBTLefmA7WFmqmGsdlDW OCTmLODx8SJGAHBRlMQ8RM+LsURbl4i3sgWEw/gZnSo58ibrFELATYvkHl1UVVl1K+9K SkbA==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:to:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:subject:date:message-id:in-reply-to:references; bh=QWkURjQ1o5S0L8K3AEw25sz7BSvYt54bsQT51JV+/k8=; b=aVm4auFF2sEFJPHpGkqvOg4M1G2dqpNZOHpuratx4x4Ff7kuqw3T9jpqv+/13ll+nN oifG3mrOzbBmKiwU9FALilqF1wmEkViSknplumSemTen1SW2JqqR+1V2xqXMEX8/SYM9 RGewkhNzkddIxIhhY1j7HXVHiJkc7otYPu1U+HqKsv9HF9GhoA+KvvIBjoGep/A647Nk 6Ix6BI55cZ6D7fmx1MhSQSbakMqyHvaxO5xeTROG7oUafuC2P+nvDvKjnSOTbhpZZ1Z4 8zay9qnMne5hW4JlopczOf9QWHfIaxEJMGFfQkyxAM74f0Clf4mWjSL+I/rU2m6/mmDz 7nbQ==
X-Gm-Message-State ALoCoQnj3GT77zTANtP9HlDG2iIIYV/UEweg7sbYq0ClJL9oya1WO85szJtGV/mmq6GRx5vg5nWx
X-Received by 10.66.153.139 with SMTP id vg11mr35852607pab.118.1446580013587; Tue, 03 Nov 2015 11:46:53 -0800 (PST)
X-Mailer git-send-email 2.4.10
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 65
Organization linux.* mail to news gateway
X-Original-Cc viro@zeniv.linux.org.uk
X-Original-Cc ast@plumgrid.com
X-Original-Cc aishchuk@linux.vnet.ibm.com
X-Original-Cc aarcange@redhat.com
X-Original-Cc akpm@linux-foundation.org
X-Original-Cc luto@kernel.org
X-Original-Cc acme@kernel.org
X-Original-Cc bhe@redhat.com
X-Original-Cc 3chas3@gmail.com
X-Original-Cc chris@zankel.net
X-Original-Cc dave@sr71.net
X-Original-Cc dyoung@redhat.com
X-Original-Cc drysdale@google.com
X-Original-Cc davem@davemloft.net
X-Original-Cc ebiederm@xmission.com
X-Original-Cc geoff@infradead.org
X-Original-Cc gregkh@linuxfoundation.org
X-Original-Cc hpa@zytor.com
X-Original-Cc mingo@kernel.org
X-Original-Cc iulia.manda21@gmail.com
X-Original-Cc plagnioj@jcrosoft.com
X-Original-Cc jikos@kernel.org
X-Original-Cc josh@joshtriplett.org
X-Original-Cc kexec@lists.infradead.org
X-Original-Cc linux-api@vger.kernel.org
X-Original-Cc linux-arch@vger.kernel.org
X-Original-Cc linux-fsdevel@vger.kernel.org
X-Original-Cc linux-kernel@vger.kernel.org
X-Original-Cc linux-xtensa@linux-xtensa.org
X-Original-Cc mathieu.desnoyers@efficios.com
X-Original-Cc jcmvbkbc@gmail.com
X-Original-Cc paulmck@linux.vnet.ibm.com
X-Original-Cc a.p.zijlstra@chello.nl
X-Original-Cc tglx@linutronix.de
X-Original-Cc tomi.valkeinen@ti.com
X-Original-Cc vgoyal@redhat.com
X-Original-Cc x86@kernel.org
X-Original-Cc Palmer Dabbelt <palmer@dabbelt.com>
X-Original-Date Tue, 3 Nov 2015 11:46:27 -0800
X-Original-Message-ID <1446579994-9937-7-git-send-email-palmer@dabbelt.com>
X-Original-References <1442271047-4908-1-git-send-email-palmer@dabbelt.com> <1446579994-9937-1-git-send-email-palmer@dabbelt.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
X-Original-To dhowells@redhat.com
Xref csiph.com linux.kernel:1261833

Show key headers only | View raw


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 <palmer@dabbelt.com>
Reviewed-by: Andrew Waterman <waterman@eecs.berkeley.edu>
Reviewed-by: Albert Ou <aou@eecs.berkeley.edu>
---
 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 1e009ca..aadee3d 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 bc81fb2..7850373 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.10

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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4] Remove #ifdef CONFIG_* from all userspace headers Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 20:50 +0100
  [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 20:50 +0100
    Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c kbuild test robot <lkp@intel.com> - 2015-11-03 22:30 +0100
    Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c kbuild test robot <lkp@intel.com> - 2015-11-03 22:40 +0100
    Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Peter Zijlstra <peterz@infradead.org> - 2015-11-04 12:50 +0100
      Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Peter Zijlstra <peterz@infradead.org> - 2015-11-04 13:30 +0100
        Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-07 07:50 +0100
  [PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 20:50 +0100
  [PATCH 11/13] Always define MAX_RAW_MINORS as 2**20 in userspace Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 20:50 +0100
    Re: [PATCH 11/13] Always define MAX_RAW_MINORS as 2**20 in userspace kbuild test robot <lkp@intel.com> - 2015-11-03 21:20 +0100
  [PATCH 13/13] Re-enable and clean up "check_config()" in headers_check.pl Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 20:50 +0100
    Re: [PATCH 13/13] Re-enable and clean up "check_config()" in  headers_check.pl kbuild test robot <lkp@intel.com> - 2015-11-03 21:30 +0100
    Re: [PATCH 13/13] Re-enable and clean up "check_config()" in  headers_check.pl kbuild test robot <lkp@intel.com> - 2015-11-03 21:30 +0100
  [PATCH 07/13] Make FB_BACKLIGHT_{LEVELS,MAX} always visible Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 20:50 +0100
  [PATCH 02/13] Use sys_ni.c instead of #ifdef to disable fork on CONFIG_NOMMU Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 20:50 +0100
  [PATCH 01/13] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 20:50 +0100
  [PATCH 12/13] Remove AT_VECTOR_SIZE_ARCH on x86 Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 20:50 +0100
  [PATCH 08/13] Move MAX_SHARED_LIBS to fs/binfmt_flat.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 20:50 +0100
  [PATCH 06/13] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 21:00 +0100
  [PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 21:00 +0100
  [PATCH 05/13] Split FDPIC "struct elf_prstatus" to "struct elf_fdpic_prstatus" Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-03 21:00 +0100
  [PATCH 10/14] Move USE_WCACHING to drivers/block/pktcdvd.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 07/14] Make FB_BACKLIGHT_{LEVELS,MAX} always visible Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 08/14] Move MAX_SHARED_LIBS to fs/binfmt_flat.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 05/14] Split FDPIC "struct elf_prstatus" to "struct elf_fdpic_prstatus" Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 02/14] Use sys_ni.c instead of #ifdef to disable fork on CONFIG_NOMMU Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 11/14] Always define MAX_RAW_MINORS as 2**20 in userspace Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 09/14] Move bp_type_idx to include/linux/hw_breakpoint.h Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 04/14] Always expose MAP_UNINITIALIZED to userspace Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 14/14] Re-enable and clean up "check_config()" in headers_check.pl Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 01/14] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 13/14] Hide CONFIG_PHY_RAM_BASE_ADDRESS from userspace Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 12/14] Remove AT_VECTOR_SIZE_ARCH on x86 Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 03/14] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH 06/14] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100
  [PATCH v5] Remove #ifdef CONFIG_* from all userspace headers Palmer Dabbelt <palmer@dabbelt.com> - 2015-11-10 02:40 +0100

csiph-web