diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-02 11:23:14 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-02 11:23:14 -0700 |
commit | b66e1f11ebc429569a3784aaf64123633d9e3ed1 (patch) | |
tree | d49f96acc682aaf29416921428110da5fd78fea4 /fs/timerfd.c | |
parent | 1be1d6b7f3f6e3a87f872dd5e7a867d03d8a6851 (diff) | |
parent | 5c598b3428c372a1209597cee99a70da20625876 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
[PATCH] fix sysctl_nr_open bugs
[PATCH] sanitize anon_inode_getfd()
[PATCH] split linux/file.h
[PATCH] make osf_select() use core_sys_select()
[PATCH] remove horrors with irix tty ioctls handling
[PATCH] fix file and descriptor handling in perfmon
Diffstat (limited to 'fs/timerfd.c')
-rw-r--r-- | fs/timerfd.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/timerfd.c b/fs/timerfd.c index 5400524e9cb..d87d354ec42 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -181,10 +181,8 @@ static struct file *timerfd_fget(int fd) asmlinkage long sys_timerfd_create(int clockid, int flags) { - int error, ufd; + int ufd; struct timerfd_ctx *ctx; - struct file *file; - struct inode *inode; if (flags) return -EINVAL; @@ -200,12 +198,9 @@ asmlinkage long sys_timerfd_create(int clockid, int flags) ctx->clockid = clockid; hrtimer_init(&ctx->tmr, clockid, HRTIMER_MODE_ABS); - error = anon_inode_getfd(&ufd, &inode, &file, "[timerfd]", - &timerfd_fops, ctx); - if (error) { + ufd = anon_inode_getfd("[timerfd]", &timerfd_fops, ctx); + if (ufd < 0) kfree(ctx); - return error; - } return ufd; } |