|
@@ -3,6 +3,7 @@
|
|
|
#ifndef FREEZER_H_INCLUDED
|
|
|
#define FREEZER_H_INCLUDED
|
|
|
|
|
|
+#include <linux/debug_locks.h>
|
|
|
#include <linux/sched.h>
|
|
|
#include <linux/wait.h>
|
|
|
#include <linux/atomic.h>
|
|
@@ -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();
|
|
|
}
|
|
|
|