aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/posix-timers.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r--kernel/posix-timers.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index ce268966007d..022c9c3cee6f 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -982,20 +982,9 @@ sys_clock_getres(const clockid_t which_clock, struct timespec __user *tp)
982static int common_nsleep(const clockid_t which_clock, int flags, 982static int common_nsleep(const clockid_t which_clock, int flags,
983 struct timespec *tsave, struct timespec __user *rmtp) 983 struct timespec *tsave, struct timespec __user *rmtp)
984{ 984{
985 struct timespec rmt; 985 return hrtimer_nanosleep(tsave, rmtp, flags & TIMER_ABSTIME ?
986 int ret; 986 HRTIMER_MODE_ABS : HRTIMER_MODE_REL,
987 987 which_clock);
988 ret = hrtimer_nanosleep(tsave, rmtp ? &rmt : NULL,
989 flags & TIMER_ABSTIME ?
990 HRTIMER_MODE_ABS : HRTIMER_MODE_REL,
991 which_clock);
992
993 if (ret && rmtp) {
994 if (copy_to_user(rmtp, &rmt, sizeof(*rmtp)))
995 return -EFAULT;
996 }
997
998 return ret;
999} 988}
1000 989
1001asmlinkage long 990asmlinkage long