diff --git a/include/linux/freezer.h b/include/linux/freezer.h index d3c038ec9a88051c3ed1b71dcd3941ef9951d50d..bcf9e651cc85ddd15a7221db7f2cd217238d7ba1 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h @@ -3,6 +3,7 @@ #ifndef FREEZER_H_INCLUDED #define FREEZER_H_INCLUDED +#include #include #include #include @@ -60,6 +61,8 @@ static inline bool try_to_freeze_unsafe(void) static inline bool try_to_freeze(void) { + if (!(current->flags & PF_NOFREEZE)) + debug_check_no_locks_held(); return try_to_freeze_unsafe(); }