mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 13:43:51 +00:00
timerfd: Remove an always true check
We would have returned -EINVAL earlier if ticks wasn't set. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Link: http://lkml.kernel.org/r/20140801082848.GF28869@mwanda Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
4259497002
commit
88299c9bdb
@ -333,8 +333,7 @@ static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg
|
|||||||
spin_lock_irq(&ctx->wqh.lock);
|
spin_lock_irq(&ctx->wqh.lock);
|
||||||
if (!timerfd_canceled(ctx)) {
|
if (!timerfd_canceled(ctx)) {
|
||||||
ctx->ticks = ticks;
|
ctx->ticks = ticks;
|
||||||
if (ticks)
|
wake_up_locked(&ctx->wqh);
|
||||||
wake_up_locked(&ctx->wqh);
|
|
||||||
} else
|
} else
|
||||||
ret = -ECANCELED;
|
ret = -ECANCELED;
|
||||||
spin_unlock_irq(&ctx->wqh.lock);
|
spin_unlock_irq(&ctx->wqh.lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user