From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753427AbZLIJnE (ORCPT ); Wed, 9 Dec 2009 04:43:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753196AbZLIJnB (ORCPT ); Wed, 9 Dec 2009 04:43:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28782 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753282AbZLIJm6 (ORCPT ); Wed, 9 Dec 2009 04:42:58 -0500 From: Stanislaw Gruszka To: Thomas Gleixner Cc: Ingo Molnar , Oleg Nesterov , Peter Zijlstra , Hidetoshi Seto , Balbir Singh , linux-kernel@vger.kernel.org, Stanislaw Gruszka Subject: [RFC PATCH 3/6] cpu-timers: return true old increase value in timer_settime() Date: Wed, 9 Dec 2009 10:39:55 +0100 Message-Id: <1260351598-4203-4-git-send-email-sgruszka@redhat.com> In-Reply-To: <1260351598-4203-3-git-send-email-sgruszka@redhat.com> References: <1260351598-4203-1-git-send-email-sgruszka@redhat.com> <1260351598-4203-2-git-send-email-sgruszka@redhat.com> <1260351598-4203-3-git-send-email-sgruszka@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Stanislaw Gruszka --- kernel/posix-cpu-timers.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 84589e9..4716c8c 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c @@ -675,7 +675,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags, struct itimerspec *new, struct itimerspec *old) { struct task_struct *p = timer->it.cpu.task; - union cpu_time_count old_expires, new_expires, val; + union cpu_time_count old_expires, new_expires, old_incr, val; int ret; if (unlikely(p == NULL)) { @@ -706,6 +706,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags, BUG_ON(!irqs_disabled()); ret = 0; + old_incr = timer->it.cpu.incr; spin_lock(&p->sighand->siglock); old_expires = timer->it.cpu.expires; if (unlikely(timer->it.cpu.firing)) { @@ -821,7 +822,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags, out: if (old) { sample_to_timespec(timer->it_clock, - timer->it.cpu.incr, &old->it_interval); + old_incr, &old->it_interval); } return ret; } -- 1.6.2.5