@@ -764,8 +764,7 @@ static struct tvec_base *lock_timer_base(struct timer_list *timer,
764
764
}
765
765
766
766
static inline int
767
- __mod_timer (struct timer_list * timer , unsigned long expires ,
768
- bool pending_only , int pinned )
767
+ __mod_timer (struct timer_list * timer , unsigned long expires , bool pending_only )
769
768
{
770
769
struct tvec_base * base , * new_base ;
771
770
unsigned long flags ;
@@ -782,7 +781,7 @@ __mod_timer(struct timer_list *timer, unsigned long expires,
782
781
783
782
debug_activate (timer , expires );
784
783
785
- new_base = get_target_base (base , pinned || timer -> flags & TIMER_PINNED );
784
+ new_base = get_target_base (base , timer -> flags & TIMER_PINNED );
786
785
787
786
if (base != new_base ) {
788
787
/*
@@ -825,7 +824,7 @@ __mod_timer(struct timer_list *timer, unsigned long expires,
825
824
*/
826
825
int mod_timer_pending (struct timer_list * timer , unsigned long expires )
827
826
{
828
- return __mod_timer (timer , expires , true, MOD_TIMER_NOT_PINNED );
827
+ return __mod_timer (timer , expires , true);
829
828
}
830
829
EXPORT_SYMBOL (mod_timer_pending );
831
830
@@ -900,38 +899,10 @@ int mod_timer(struct timer_list *timer, unsigned long expires)
900
899
if (timer_pending (timer ) && timer -> expires == expires )
901
900
return 1 ;
902
901
903
- return __mod_timer (timer , expires , false, MOD_TIMER_NOT_PINNED );
902
+ return __mod_timer (timer , expires , false);
904
903
}
905
904
EXPORT_SYMBOL (mod_timer );
906
905
907
- /**
908
- * mod_timer_pinned - modify a timer's timeout
909
- * @timer: the timer to be modified
910
- * @expires: new timeout in jiffies
911
- *
912
- * mod_timer_pinned() is a way to update the expire field of an
913
- * active timer (if the timer is inactive it will be activated)
914
- * and to ensure that the timer is scheduled on the current CPU.
915
- *
916
- * Note that this does not prevent the timer from being migrated
917
- * when the current CPU goes offline. If this is a problem for
918
- * you, use CPU-hotplug notifiers to handle it correctly, for
919
- * example, cancelling the timer when the corresponding CPU goes
920
- * offline.
921
- *
922
- * mod_timer_pinned(timer, expires) is equivalent to:
923
- *
924
- * del_timer(timer); timer->expires = expires; add_timer(timer);
925
- */
926
- int mod_timer_pinned (struct timer_list * timer , unsigned long expires )
927
- {
928
- if (timer -> expires == expires && timer_pending (timer ))
929
- return 1 ;
930
-
931
- return __mod_timer (timer , expires , false, MOD_TIMER_PINNED );
932
- }
933
- EXPORT_SYMBOL (mod_timer_pinned );
934
-
935
906
/**
936
907
* add_timer - start a timer
937
908
* @timer: the timer to be added
@@ -1512,7 +1483,7 @@ signed long __sched schedule_timeout(signed long timeout)
1512
1483
expire = timeout + jiffies ;
1513
1484
1514
1485
setup_timer_on_stack (& timer , process_timeout , (unsigned long )current );
1515
- __mod_timer (& timer , expire , false, MOD_TIMER_NOT_PINNED );
1486
+ __mod_timer (& timer , expire , false);
1516
1487
schedule ();
1517
1488
del_singleshot_timer_sync (& timer );
1518
1489
0 commit comments