]> err.no Git - linux-2.6/blobdiff - kernel/posix-timers.c
[PATCH] GFP_KERNEL allocations in atomic (auditsc)
[linux-2.6] / kernel / posix-timers.c
index 28e72fd0029fa466e1768d40bcb10b28a2505450..216f574b5ffb758ca0630868bca07f03a3d9a116 100644 (file)
@@ -724,8 +724,13 @@ common_timer_set(struct k_itimer *timr, int flags,
        timr->it.real.interval = timespec_to_ktime(new_setting->it_interval);
 
        /* SIGEV_NONE timers are not queued ! See common_timer_get */
-       if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE))
+       if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) {
+               /* Setup correct expiry time for relative timers */
+               if (mode == HRTIMER_REL)
+                       timer->expires = ktime_add(timer->expires,
+                                                  timer->base->get_time());
                return 0;
+       }
 
        hrtimer_start(timer, timer->expires, mode);
        return 0;
@@ -870,12 +875,6 @@ int do_posix_clock_nosettime(const clockid_t clockid, struct timespec *tp)
 }
 EXPORT_SYMBOL_GPL(do_posix_clock_nosettime);
 
-int do_posix_clock_notimer_create(struct k_itimer *timer)
-{
-       return -EINVAL;
-}
-EXPORT_SYMBOL_GPL(do_posix_clock_notimer_create);
-
 int do_posix_clock_nonanosleep(const clockid_t clock, int flags,
                               struct timespec *t, struct timespec __user *r)
 {