aboutsummaryrefslogtreecommitdiff
path: root/fs/timerfd.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-06-24 17:16:40 +0900
committerPaul Mundt <lethal@linux-sh.org>2011-06-24 17:16:40 +0900
commit20733d59d5763ecd96276f868c1f39e677b3b4e2 (patch)
tree89177676a2a45afa97595ce1827630aa131c51e2 /fs/timerfd.c
parent75e1b6a84f7e2186e843da94751b6d175caf9209 (diff)
parent17e8c4e1ebf139743e3830439fa65fd906af4a43 (diff)
Merge branch 'fbdev/stable-updates'
Diffstat (limited to 'fs/timerfd.c')
-rw-r--r--fs/timerfd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/timerfd.c b/fs/timerfd.c
index f67acbdda5e..dffeb3795af 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -61,7 +61,9 @@ static enum hrtimer_restart timerfd_tmrproc(struct hrtimer *htmr)
/*
* Called when the clock was set to cancel the timers in the cancel
- * list.
+ * list. This will wake up processes waiting on these timers. The
+ * wake-up requires ctx->ticks to be non zero, therefore we increment
+ * it before calling wake_up_locked().
*/
void timerfd_clock_was_set(void)
{
@@ -76,6 +78,7 @@ void timerfd_clock_was_set(void)
spin_lock_irqsave(&ctx->wqh.lock, flags);
if (ctx->moffs.tv64 != moffs.tv64) {
ctx->moffs.tv64 = KTIME_MAX;
+ ctx->ticks++;
wake_up_locked(&ctx->wqh);
}
spin_unlock_irqrestore(&ctx->wqh.lock, flags);