summaryrefslogtreecommitdiff
path: root/fs/timerfd.c
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2011-08-02 20:14:02 (GMT)
committerChris Metcalf <cmetcalf@tilera.com>2011-08-02 20:14:02 (GMT)
commit3d071cd313643cf82b1ce1ce4fdf08d63ad53964 (patch)
tree874c1683f32f07614aa123f6ca5cf6c2bd443704 /fs/timerfd.c
parentcf8e98d15361f8c594da00a3f7a500787fc1a426 (diff)
parent02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff)
downloadlinux-fsl-qoriq-3d071cd313643cf82b1ce1ce4fdf08d63ad53964.tar.xz
Merge tag 'v3.0' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
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 f67acbd..dffeb37 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);