X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Ftimerfd.c;h=d87d354ec42438a4a0794cf964999eb376053c73;hb=39dbc5bd345ebf93e066dde7f8e29467eb61b42e;hp=10c80b59ec4bb7e542b8864f369ec10da7dc34f5;hpb=f315ccb3e679f271583f2a4f463ad9b65665b751;p=linux-2.6-omap-h63xx.git diff --git a/fs/timerfd.c b/fs/timerfd.c index 10c80b59ec4..d87d354ec42 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -20,6 +20,7 @@ #include #include #include +#include struct timerfd_ctx { struct hrtimer tmr; @@ -180,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; @@ -199,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; }