aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/posix-cpu-timers.c
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2017-06-24 11:45:06 -0700
committerAl Viro <viro@zeniv.linux.org.uk>2017-06-30 04:14:14 -0400
commitc0edd7c9acd0eaee149ab6cb4441cc71a1af87f0 (patch)
tree9c670f99b106a03963fa9a2bc606617cd0958497 /kernel/time/posix-cpu-timers.c
parentposix-timers: Use get_timespec64() and put_timespec64() (diff)
downloadlinux-dev-c0edd7c9acd0eaee149ab6cb4441cc71a1af87f0.tar.xz
linux-dev-c0edd7c9acd0eaee149ab6cb4441cc71a1af87f0.zip
nanosleep: Use get_timespec64() and put_timespec64()
Usage of these apis and their compat versions makes the syscalls: clock_nanosleep and nanosleep and their compat implementations simpler. This is a preparatory patch to isolate data conversions to struct timespec64 at userspace boundaries. This helps contain the changes needed to transition to new y2038 safe types. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/time/posix-cpu-timers.c')
-rw-r--r--kernel/time/posix-cpu-timers.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index 9df618ee64cf..7323da5950cc 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -1314,12 +1314,8 @@ static int do_cpu_nanosleep(const clockid_t which_clock, int flags,
*/
restart = &current->restart_block;
restart->nanosleep.expires = expires;
- if (restart->nanosleep.type != TT_NONE) {
- struct timespec ts;
-
- ts = timespec64_to_timespec(it.it_value);
- error = nanosleep_copyout(restart, &ts);
- }
+ if (restart->nanosleep.type != TT_NONE)
+ error = nanosleep_copyout(restart, &it.it_value);
}
return error;