[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0805061542250.25162@alien.or.mcafeemobile.com>
Date: Tue, 6 May 2008 15:45:21 -0700 (PDT)
From: Davide Libenzi <davidel@...ilserver.org>
To: Ulrich Drepper <drepper@...hat.com>
cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
netdev@...r.kernel.org, Andrew Morton <akpm@...ux-foundation.org>,
mtk.manpages@...il.com,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 15/18] flag parameters: NONBLOCK in timerfd_create
On Tue, 6 May 2008, Ulrich Drepper wrote:
> diff --git a/fs/timerfd.c b/fs/timerfd.c
> index c6ef5e3..75d44ef 100644
> --- a/fs/timerfd.c
> +++ b/fs/timerfd.c
> @@ -184,7 +184,7 @@ asmlinkage long sys_timerfd_create(int clockid, int flags)
> int ufd;
> struct timerfd_ctx *ctx;
>
> - if (flags & ~TFD_CLOEXEC)
> + if (flags & ~(TFD_CLOEXEC | TFD_NONBLOCK))
> return -EINVAL;
> if (clockid != CLOCK_MONOTONIC &&
> clockid != CLOCK_REALTIME)
> @@ -199,7 +199,7 @@ asmlinkage long sys_timerfd_create(int clockid, int flags)
> hrtimer_init(&ctx->tmr, clockid, HRTIMER_MODE_ABS);
>
> ufd = anon_inode_getfd("[timerfd]", &timerfd_fops, ctx,
> - flags & O_CLOEXEC);
> + flags & (O_CLOEXEC | O_NONBLOCK));
> if (ufd < 0)
> kfree(ctx);
This is perfectly fine for me. Since the flags space for these new
syscalls is almost empty, it makes perfect sense to just map them to the
original O_* flags.
Acked-by: Davide Libenzi <davidel@...ilserver.org>
(for the whole serie)
- Davide
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists