Re: [PATCH 15/18] flag parameters: NONBLOCK in timerfd_create
From: Davide Libenzi
Date: Tue May 06 2008 - 18:45:40 EST
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@xxxxxxxxxxxxxxx>
(for the whole serie)
- Davide
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/