lkml.org 
[lkml]   [2018]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 11/35] syscalls: do not call sys_eventfd2() within the kernel
    Date
    CC: Alexander Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
    ---
    fs/eventfd.c | 9 +++++++--
    1 file 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)
    }
    EXPORT_SYMBOL_GPL(eventfd_ctx_fileget);

    -SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)
    +static int do_eventfd(unsigned int count, int flags)
    {
    struct eventfd_ctx *ctx;
    int fd;
    @@ -409,8 +409,13 @@ SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)
    return fd;
    }

    +SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)
    +{
    + return do_eventfd(count, flags);
    +}
    +
    SYSCALL_DEFINE1(eventfd, unsigned int, count)
    {
    - return sys_eventfd2(count, 0);
    + return do_eventfd(count, 0);
    }

    --
    2.16.2
    \
     
     \ /
      Last update: 2018-03-11 12:04    [W:4.110 / U:0.356 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site