From: Tejun Heo Date: Sat, 20 Aug 2011 09:31:40 +0000 (+0200) Subject: freezer: remove should_send_signal() and update frozen() X-Git-Tag: next-20110822~18^2^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7b5b95b3f51a28ec008a295e5247436637220f41;p=karo-tx-linux.git freezer: remove should_send_signal() and update frozen() should_send_signal() is only used in freezer.c. Exporting them only increases chance of abuse. Open code the two users and remove it. Update frozen() to return bool. Signed-off-by: Tejun Heo --- diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 11b2bd9a02e8..122b5ce186df 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 */ /* * Check if a process has been frozen */ -static inline int frozen(struct task_struct *p) +static inline bool frozen(struct task_struct *p) { return p->flags & PF_FROZEN; } @@ -32,11 +32,6 @@ static inline bool freezing(struct task_struct *p) return freezing_slow_path(p); } -static inline bool should_send_signal(struct task_struct *p) -{ - return !(p->flags & PF_FREEZER_NOSIG); -} - /* Takes and releases task alloc lock using task_lock() */ extern void __thaw_task(struct task_struct *t); @@ -156,7 +151,7 @@ static inline bool set_freezable_with_signal(void) __retval; \ }) #else /* !CONFIG_FREEZER */ -static inline int frozen(struct task_struct *p) { return 0; } +static inline bool frozen(struct task_struct *p) { return false; } static inline bool freezing(struct task_struct *p) { return false; } static inline bool __refrigerator(bool check_kthr_stop) { return false; } diff --git a/kernel/freezer.c b/kernel/freezer.c index 995bddf82e56..466ea6bd7ff0 100644 --- a/kernel/freezer.c +++ b/kernel/freezer.c @@ -129,7 +129,7 @@ bool freeze_task(struct task_struct *p, bool sig_only) return false; } - if (should_send_signal(p)) { + if (!(p->flags & PF_FREEZER_NOSIG)) { fake_signal_wake_up(p); /* * fake_signal_wake_up() goes through p's scheduler