aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/freezer.h9
-rw-r--r--kernel/freezer.c2
2 files changed, 3 insertions, 8 deletions
diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index 8e29f2b7ce11..3d50913d39d0 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -15,7 +15,7 @@ extern bool pm_nosig_freezing; /* PM nosig freezing in effect */
15/* 15/*
16 * Check if a process has been frozen 16 * Check if a process has been frozen
17 */ 17 */
18static inline int frozen(struct task_struct *p) 18static inline bool frozen(struct task_struct *p)
19{ 19{
20 return p->flags & PF_FROZEN; 20 return p->flags & PF_FROZEN;
21} 21}
@@ -32,11 +32,6 @@ static inline bool freezing(struct task_struct *p)
32 return freezing_slow_path(p); 32 return freezing_slow_path(p);
33} 33}
34 34
35static inline bool should_send_signal(struct task_struct *p)
36{
37 return !(p->flags & PF_FREEZER_NOSIG);
38}
39
40/* Takes and releases task alloc lock using task_lock() */ 35/* Takes and releases task alloc lock using task_lock() */
41extern void __thaw_task(struct task_struct *t); 36extern void __thaw_task(struct task_struct *t);
42 37
@@ -166,7 +161,7 @@ static inline void set_freezable_with_signal(void)
166 __retval; \ 161 __retval; \
167}) 162})
168#else /* !CONFIG_FREEZER */ 163#else /* !CONFIG_FREEZER */
169static inline int frozen(struct task_struct *p) { return 0; } 164static inline bool frozen(struct task_struct *p) { return false; }
170static inline bool freezing(struct task_struct *p) { return false; } 165static inline bool freezing(struct task_struct *p) { return false; }
171 166
172static inline bool __refrigerator(bool check_kthr_stop) { return false; } 167static inline bool __refrigerator(bool check_kthr_stop) { return false; }
diff --git a/kernel/freezer.c b/kernel/freezer.c
index f53cd5aa5b2e..95a123844241 100644
--- a/kernel/freezer.c
+++ b/kernel/freezer.c
@@ -132,7 +132,7 @@ bool freeze_task(struct task_struct *p, bool sig_only)
132 return false; 132 return false;
133 } 133 }
134 134
135 if (should_send_signal(p)) { 135 if (!(p->flags & PF_FREEZER_NOSIG)) {
136 fake_signal_wake_up(p); 136 fake_signal_wake_up(p);
137 /* 137 /*
138 * fake_signal_wake_up() goes through p's scheduler 138 * fake_signal_wake_up() goes through p's scheduler