hrtimer: Move copyout of remaining time to do_nanosleep()
authorAl Viro <viro@ZenIV.linux.org.uk>
Wed, 7 Jun 2017 08:42:29 +0000 (09:42 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 13 Jun 2017 22:00:41 +0000 (00:00 +0200)
commita7602681fc63f1a3ddd3da336296c9634c2ff974
tree5b845e7c95f763609080fa9d5e5f0b5f859add93
parent192a82f9003fe8fabd6088aa646e829225a94c55
hrtimer: Move copyout of remaining time to do_nanosleep()

The hrtimer nanosleep() implementation can be simplified by moving the copy
out of the remaining time to do_nanosleep() which is shared between the
real nanosleep function and the restart function.

The pointer to the timespec64 which is updated is already stored in the
restart block at the call site, so the seperate handling of nanosleep and
restart function can be avoided.

[ 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-4-viro@ZenIV.linux.org.uk
kernel/time/hrtimer.c