aboutsummaryrefslogtreecommitdiffstats
path: root/fs/timerfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/timerfd.c')
-rw-r--r--fs/timerfd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/timerfd.c b/fs/timerfd.c
index c6ef5e33cb34..75d44efe346c 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -184,7 +184,7 @@ asmlinkage long sys_timerfd_create(int clockid, int flags)
184 int ufd; 184 int ufd;
185 struct timerfd_ctx *ctx; 185 struct timerfd_ctx *ctx;
186 186
187 if (flags & ~TFD_CLOEXEC) 187 if (flags & ~(TFD_CLOEXEC | TFD_NONBLOCK))
188 return -EINVAL; 188 return -EINVAL;
189 if (clockid != CLOCK_MONOTONIC && 189 if (clockid != CLOCK_MONOTONIC &&
190 clockid != CLOCK_REALTIME) 190 clockid != CLOCK_REALTIME)
@@ -199,7 +199,7 @@ asmlinkage long sys_timerfd_create(int clockid, int flags)
199 hrtimer_init(&ctx->tmr, clockid, HRTIMER_MODE_ABS); 199 hrtimer_init(&ctx->tmr, clockid, HRTIMER_MODE_ABS);
200 200
201 ufd = anon_inode_getfd("[timerfd]", &timerfd_fops, ctx, 201 ufd = anon_inode_getfd("[timerfd]", &timerfd_fops, ctx,
202 flags & O_CLOEXEC); 202 flags & (O_CLOEXEC | O_NONBLOCK));
203 if (ufd < 0) 203 if (ufd < 0)
204 kfree(ctx); 204 kfree(ctx);
205 205