From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> This was just extra debug to hunt down a regression, which got fixed. This reverts commit d77cc11a9ab0558923d304683ad2307ec0cd5681. Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> --- kernel/freezer.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/kernel/freezer.c b/kernel/freezer.c index e211184c26c7..4fad0e6fca64 100644 --- a/kernel/freezer.c +++ b/kernel/freezer.c @@ -125,16 +125,8 @@ static int __set_task_frozen(struct task_struct *p, void *arg) /* * It's dangerous to freeze with locks held; there be dragons there. */ - if (!(state & __TASK_FREEZABLE_UNSAFE)) { - static bool warned = false; - - if (!warned && debug_locks && p->lockdep_depth) { - debug_show_held_locks(p); - WARN(1, "%s/%d holding locks while freezing\n", - p->comm, task_pid_nr(p)); - warned = true; - } - } + if (!(state & __TASK_FREEZABLE_UNSAFE)) + WARN_ON_ONCE(debug_locks && p->lockdep_depth); #endif WRITE_ONCE(p->__state, TASK_FROZEN); -- 2.41.0