git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
flag parameters: timerfd_create
[safe/jmp/linux-2.6]
/
fs
/
timerfd.c
diff --git
a/fs/timerfd.c
b/fs/timerfd.c
index
77c2bc9
..
c6ef5e3
100644
(file)
--- 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;
int ufd;
struct timerfd_ctx *ctx;
- if (flags)
+ if (flags
& ~TFD_CLOEXEC
)
return -EINVAL;
if (clockid != CLOCK_MONOTONIC &&
clockid != CLOCK_REALTIME)
return -EINVAL;
if (clockid != CLOCK_MONOTONIC &&
clockid != CLOCK_REALTIME)
@@
-198,7
+198,8
@@
asmlinkage long sys_timerfd_create(int clockid, int flags)
ctx->clockid = clockid;
hrtimer_init(&ctx->tmr, clockid, HRTIMER_MODE_ABS);
ctx->clockid = clockid;
hrtimer_init(&ctx->tmr, clockid, HRTIMER_MODE_ABS);
- ufd = anon_inode_getfd("[timerfd]", &timerfd_fops, ctx, 0);
+ ufd = anon_inode_getfd("[timerfd]", &timerfd_fops, ctx,
+ flags & O_CLOEXEC);
if (ufd < 0)
kfree(ctx);
if (ufd < 0)
kfree(ctx);