Offering: HULK hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7R8WG
--------------------------------
A previous commit made del_timer[_sync]() obsolete and unexported, which caused kabi to break. So making del_timer[_sync]() exported, the same as before.
Signed-off-by: Yu Liao liaoyu15@huawei.com --- include/linux/timer.h | 28 ++-------------------------- kernel/time/timer.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 26 deletions(-)
diff --git a/include/linux/timer.h b/include/linux/timer.h index e095f11cf665..13fc6e688c73 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -190,35 +190,11 @@ extern void add_timer(struct timer_list *timer); extern int try_to_del_timer_sync(struct timer_list *timer); extern int timer_delete_sync(struct timer_list *timer); extern int timer_delete(struct timer_list *timer); +extern int del_timer_sync(struct timer_list *timer); +extern int del_timer(struct timer_list *timer); extern int timer_shutdown_sync(struct timer_list *timer); extern int timer_shutdown(struct timer_list *timer);
-/** - * del_timer_sync - Delete a pending timer and wait for a running callback - * @timer: The timer to be deleted - * - * See timer_delete_sync() for detailed explanation. - * - * Do not use in new code. Use timer_delete_sync() instead. - */ -static inline int del_timer_sync(struct timer_list *timer) -{ - return timer_delete_sync(timer); -} - -/** - * del_timer - Delete a pending timer - * @timer: The timer to be deleted - * - * See timer_delete() for detailed explanation. - * - * Do not use in new code. Use timer_delete() instead. - */ -static inline int del_timer(struct timer_list *timer) -{ - return timer_delete(timer); -} - extern void init_timers(void); extern void run_local_timers(void); struct hrtimer; diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 14c48a0144ea..c1b52dab3951 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -1309,6 +1309,20 @@ int timer_delete(struct timer_list *timer) } EXPORT_SYMBOL(timer_delete);
+/** + * del_timer - Delete a pending timer + * @timer: The timer to be deleted + * + * See timer_delete() for detailed explanation. + * + * Do not use in new code. Use timer_delete() instead. + */ +int del_timer(struct timer_list *timer) +{ + return __timer_delete(timer, false); +} +EXPORT_SYMBOL(del_timer); + /** * timer_shutdown - Deactivate a timer and prevent rearming * @timer: The timer to be deactivated @@ -1569,6 +1583,20 @@ int timer_delete_sync(struct timer_list *timer) } EXPORT_SYMBOL(timer_delete_sync);
+/** + * del_timer_sync - Delete a pending timer and wait for a running callback + * @timer: The timer to be deleted + * + * See timer_delete_sync() for detailed explanation. + * + * Do not use in new code. Use timer_delete_sync() instead. + */ +int del_timer_sync(struct timer_list *timer) +{ + return __timer_delete_sync(timer, false); +} +EXPORT_SYMBOL(del_timer_sync); + /** * timer_shutdown_sync - Shutdown a timer and prevent rearming * @timer: The timer to be shutdown