aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-02-01 12:41:30 -0500
committerThomas Gleixner <tglx@linutronix.de>2008-02-10 04:48:03 -0500
commitc289b074b66e2e59c65aba73f40b99e797e92d2f (patch)
tree03ecf2381f33941e8d84e1d5b2d8e106109ea7da /kernel/hrtimer.c
parent416529374b4793ba2d2e97e736d108a2e0f3ef07 (diff)
hrtimer: don't modify restart_block->fn in restart functions
hrtimer_nanosleep_restart() clears/restores restart_block->fn. This is pointless and complicates its usage. Note that if sys_restart_syscall() doesn't actually happen, we have a bogus "pending" restart->fn anyway, this is harmless. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Alexey Dobriyan <adobriyan@sw.ru> Cc: Pavel Emelyanov <xemul@sw.ru> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Toyo Abe <toyoa@mvista.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 355085f0896e..3f4a57c7895d 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1340,8 +1340,6 @@ long __sched hrtimer_nanosleep_restart(struct restart_block *restart)
1340 struct hrtimer_sleeper t; 1340 struct hrtimer_sleeper t;
1341 struct timespec __user *rmtp; 1341 struct timespec __user *rmtp;
1342 1342
1343 restart->fn = do_no_restart_syscall;
1344
1345 hrtimer_init(&t.timer, restart->arg0, HRTIMER_MODE_ABS); 1343 hrtimer_init(&t.timer, restart->arg0, HRTIMER_MODE_ABS);
1346 t.timer.expires.tv64 = ((u64)restart->arg3 << 32) | (u64) restart->arg2; 1344 t.timer.expires.tv64 = ((u64)restart->arg3 << 32) | (u64) restart->arg2;
1347 1345
@@ -1355,8 +1353,6 @@ long __sched hrtimer_nanosleep_restart(struct restart_block *restart)
1355 return ret; 1353 return ret;
1356 } 1354 }
1357 1355
1358 restart->fn = hrtimer_nanosleep_restart;
1359
1360 /* The other values in restart are already filled in */ 1356 /* The other values in restart are already filled in */
1361 return -ERESTART_RESTARTBLOCK; 1357 return -ERESTART_RESTARTBLOCK;
1362} 1358}