]> git.baikalelectronics.ru Git - kernel.git/commit
alarmtimer: Move copyout and freeze handling into alarmtimer_do_nsleep()
authorAl Viro <viro@ZenIV.linux.org.uk>
Wed, 7 Jun 2017 08:42:27 +0000 (09:42 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 13 Jun 2017 22:00:40 +0000 (00:00 +0200)
commit0a2941b10c22af4539a3b1b03d9e6fb873464a00
tree8fbbecce0be3837fcea78d9854c8d04d3f6d4441
parent09288d1e6e0cdafcf56e028226cb37f8ced44f56
alarmtimer: Move copyout and freeze handling into alarmtimer_do_nsleep()

The alarmtimer nanosleep() implementation can be simplified by moving the
copy out of the remaining time to alarmtimer_do_nsleep() 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 alarmtimer_do_nsleep() 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-2-viro@ZenIV.linux.org.uk
kernel/time/alarmtimer.c