]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
posix-cpu-timers: Move copyout of timespec into do_cpu_nanosleep()
authorAl Viro <viro@ZenIV.linux.org.uk>
Wed, 7 Jun 2017 08:42:26 +0000 (09:42 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 13 Jun 2017 22:00:40 +0000 (00:00 +0200)
commit86a9c446c13ecd8793ea8599761322aed125d542
treebde83380c319ae48a92e148e958b4987310d6051
parent67edab48caeb75d412706f4b9d3107afd1e07623
posix-cpu-timers: Move copyout of timespec into do_cpu_nanosleep()

The posix-cpu-timer nanosleep() implementation can be simplified by moving
the copy out of the remaining time to do_cpu_nanosleep() which is shared
between the real nanosleep function and the restart function.

The pointer to the timespec64 which is updated has to be stored in the
restart block anyway. Instead of storing it only in the restart case, store
it before calling do_cpu_nanosleep() and copy the remaining time in the
signal exit path.

[ tglx: Added changelog ]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170607084241.28657-1-viro@ZenIV.linux.org.uk
kernel/time/posix-cpu-timers.c