All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Dan Carpenter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	gorcunov@openvz.org, tglx@linutronix.de, viro@zeniv.linux.org.uk,
	dan.carpenter@oracle.com
Subject: [tip:timers/core] timerfd: Remove an always true check
Date: Wed, 27 Aug 2014 02:21:30 -0700	[thread overview]
Message-ID: <tip-88299c9bdb109e0d95abdca648065631ff91b2cb@git.kernel.org> (raw)
In-Reply-To: <20140801082848.GF28869@mwanda>

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);

      parent reply	other threads:[~2014-08-27  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot for Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-88299c9bdb109e0d95abdca648065631ff91b2cb@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=dan.carpenter@oracle.com \
    --cc=gorcunov@openvz.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.