* [patch] timerfd: remove an always true check
@ 2014-08-01 8:28 ` Dan Carpenter
0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2014-08-01 8:28 UTC (permalink / raw)
To: Thomas Gleixner, Cyrill Gorcunov
Cc: Alexander Viro, linux-fsdevel, kernel-janitors
We would have returned -EINVAL earlier if ticks wasn't set.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/timerfd.c b/fs/timerfd.c
index 80c3502..b46ffa9 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -333,8 +333,7 @@ static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg
spin_lock_irq(&ctx->wqh.lock);
if (!timerfd_canceled(ctx)) {
ctx->ticks = ticks;
- if (ticks)
- wake_up_locked(&ctx->wqh);
+ wake_up_locked(&ctx->wqh);
} else
ret = -ECANCELED;
spin_unlock_irq(&ctx->wqh.lock);
^ permalink raw reply related [flat|nested] 5+ messages in thread* [patch] timerfd: remove an always true check
@ 2014-08-01 8:28 ` Dan Carpenter
0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2014-08-01 8:28 UTC (permalink / raw)
To: Thomas Gleixner, Cyrill Gorcunov
Cc: Alexander Viro, linux-fsdevel, kernel-janitors
We would have returned -EINVAL earlier if ticks wasn't set.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/timerfd.c b/fs/timerfd.c
index 80c3502..b46ffa9 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -333,8 +333,7 @@ static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg
spin_lock_irq(&ctx->wqh.lock);
if (!timerfd_canceled(ctx)) {
ctx->ticks = ticks;
- if (ticks)
- wake_up_locked(&ctx->wqh);
+ wake_up_locked(&ctx->wqh);
} else
ret = -ECANCELED;
spin_unlock_irq(&ctx->wqh.lock);
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [patch] timerfd: remove an always true check
2014-08-01 8:28 ` Dan Carpenter
@ 2014-08-01 8:32 ` Cyrill Gorcunov
-1 siblings, 0 replies; 5+ messages in thread
From: Cyrill Gorcunov @ 2014-08-01 8:32 UTC (permalink / raw)
To: Dan Carpenter
Cc: Thomas Gleixner, Alexander Viro, linux-fsdevel, kernel-janitors
On Fri, Aug 01, 2014 at 11:28:48AM +0300, Dan Carpenter wrote:
> We would have returned -EINVAL earlier if ticks wasn't set.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Yeah, thanks a lot, Dan!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] timerfd: remove an always true check
@ 2014-08-01 8:32 ` Cyrill Gorcunov
0 siblings, 0 replies; 5+ messages in thread
From: Cyrill Gorcunov @ 2014-08-01 8:32 UTC (permalink / raw)
To: Dan Carpenter
Cc: Thomas Gleixner, Alexander Viro, linux-fsdevel, kernel-janitors
On Fri, Aug 01, 2014 at 11:28:48AM +0300, Dan Carpenter wrote:
> We would have returned -EINVAL earlier if ticks wasn't set.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Yeah, thanks a lot, Dan!
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:timers/core] timerfd: Remove an always true check
2014-08-01 8:28 ` Dan Carpenter
(?)
(?)
@ 2014-08-27 9:21 ` tip-bot for Dan Carpenter
-1 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Dan Carpenter @ 2014-08-27 9:21 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, gorcunov, tglx, viro, dan.carpenter
Commit-ID: 88299c9bdb109e0d95abdca648065631ff91b2cb
Gitweb: http://git.kernel.org/tip/88299c9bdb109e0d95abdca648065631ff91b2cb
Author: Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate: Fri, 1 Aug 2014 11:28:48 +0300
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 27 Aug 2014 11:17:48 +0200
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>
---
fs/timerfd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/timerfd.c b/fs/timerfd.c
index 80c3502..b46ffa9 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -333,8 +333,7 @@ static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg
spin_lock_irq(&ctx->wqh.lock);
if (!timerfd_canceled(ctx)) {
ctx->ticks = ticks;
- if (ticks)
- wake_up_locked(&ctx->wqh);
+ wake_up_locked(&ctx->wqh);
} else
ret = -ECANCELED;
spin_unlock_irq(&ctx->wqh.lock);
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-08-27 9:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 8:28 [patch] timerfd: remove an always true check Dan Carpenter
2014-08-01 8:28 ` Dan Carpenter
2014-08-01 8:32 ` Cyrill Gorcunov
2014-08-01 8:32 ` Cyrill Gorcunov
2014-08-27 9:21 ` [tip:timers/core] timerfd: Remove " tip-bot for Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.