diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2017-06-07 09:42:30 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-06-14 00:00:41 +0200 |
commit | 99e6c0e6ec349575886ca7daffc9cb7ec583176f (patch) | |
tree | 3b4225e202a22e20b426ede53d6ced424c395c0c /kernel/time/posix-cpu-timers.c | |
parent | a7602681fc63f1a3ddd3da336296c9634c2ff974 (diff) | |
download | linux-99e6c0e6ec349575886ca7daffc9cb7ec583176f.tar.bz2 |
posix-timers: Store rmtp into restart_block in sys_clock_nanosleep()
... instead of doing that in every ->nsleep() instance
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-5-viro@ZenIV.linux.org.uk
Diffstat (limited to 'kernel/time/posix-cpu-timers.c')
-rw-r--r-- | kernel/time/posix-cpu-timers.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c index 239fff980fd0..ec6258c9cde5 100644 --- a/kernel/time/posix-cpu-timers.c +++ b/kernel/time/posix-cpu-timers.c @@ -1328,16 +1328,11 @@ static int do_cpu_nanosleep(const clockid_t which_clock, int flags, static long posix_cpu_nsleep_restart(struct restart_block *restart_block); static int posix_cpu_nsleep(const clockid_t which_clock, int flags, - struct timespec64 *rqtp, struct timespec __user *rmtp) + struct timespec64 *rqtp) { struct restart_block *restart_block = ¤t->restart_block; int error; - if (flags & TIMER_ABSTIME) - rmtp = NULL; - - restart_block->nanosleep.rmtp = rmtp; - /* * Diagnose required errors first. */ @@ -1388,10 +1383,9 @@ static int process_cpu_timer_create(struct k_itimer *timer) return posix_cpu_timer_create(timer); } static int process_cpu_nsleep(const clockid_t which_clock, int flags, - struct timespec64 *rqtp, - struct timespec __user *rmtp) + struct timespec64 *rqtp) { - return posix_cpu_nsleep(PROCESS_CLOCK, flags, rqtp, rmtp); + return posix_cpu_nsleep(PROCESS_CLOCK, flags, rqtp); } static long process_cpu_nsleep_restart(struct restart_block *restart_block) { |