summaryrefslogtreecommitdiffstats
path: root/fs/eventfd.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-03-11 06:34:37 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2018-04-02 14:15:39 -0400
commit2fc96f8331ba7d08ddc126d154a1504b9a79b79e (patch)
treee285a734bc1b9a79d6d99b1eec0699f9a12f51f0 /fs/eventfd.c
parent52fb6db0fd6f50ac71475f02b96098fbb1fb3417 (diff)
fs: add do_eventfd() helper; remove internal call to sys_eventfd()
Using this helper removes an in-kernel call to the sys_eventfd() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'fs/eventfd.c')
-rw-r--r--fs/eventfd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/eventfd.c b/fs/eventfd.c
index 012f5bd46dfa..08d3bd602f73 100644
--- a/fs/eventfd.c
+++ b/fs/eventfd.c
@@ -380,7 +380,7 @@ struct eventfd_ctx *eventfd_ctx_fileget(struct file *file)
380} 380}
381EXPORT_SYMBOL_GPL(eventfd_ctx_fileget); 381EXPORT_SYMBOL_GPL(eventfd_ctx_fileget);
382 382
383SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags) 383static int do_eventfd(unsigned int count, int flags)
384{ 384{
385 struct eventfd_ctx *ctx; 385 struct eventfd_ctx *ctx;
386 int fd; 386 int fd;
@@ -409,8 +409,13 @@ SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)
409 return fd; 409 return fd;
410} 410}
411 411
412SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)
413{
414 return do_eventfd(count, flags);
415}
416
412SYSCALL_DEFINE1(eventfd, unsigned int, count) 417SYSCALL_DEFINE1(eventfd, unsigned int, count)
413{ 418{
414 return sys_eventfd2(count, 0); 419 return do_eventfd(count, 0);
415} 420}
416 421