diff options
Diffstat (limited to 'kernel/hrtimer.c')
| -rw-r--r-- | kernel/hrtimer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index a0222097c57e..9a4c90185566 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
| @@ -1563,9 +1563,14 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp, | |||
| 1563 | struct restart_block *restart; | 1563 | struct restart_block *restart; |
| 1564 | struct hrtimer_sleeper t; | 1564 | struct hrtimer_sleeper t; |
| 1565 | int ret = 0; | 1565 | int ret = 0; |
| 1566 | unsigned long slack; | ||
| 1567 | |||
| 1568 | slack = current->timer_slack_ns; | ||
| 1569 | if (rt_task(current)) | ||
| 1570 | slack = 0; | ||
| 1566 | 1571 | ||
| 1567 | hrtimer_init_on_stack(&t.timer, clockid, mode); | 1572 | hrtimer_init_on_stack(&t.timer, clockid, mode); |
| 1568 | hrtimer_set_expires(&t.timer, timespec_to_ktime(*rqtp)); | 1573 | hrtimer_set_expires_range_ns(&t.timer, timespec_to_ktime(*rqtp), slack); |
| 1569 | if (do_nanosleep(&t, mode)) | 1574 | if (do_nanosleep(&t, mode)) |
| 1570 | goto out; | 1575 | goto out; |
| 1571 | 1576 | ||
