summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorKevin Hao <haokexin@gmail.com>2023-12-20 01:35:35 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-12-20 19:16:55 +0100
commite0f4bd26e29bf6162cdc9dc6fb7522bde7b74d07 (patch)
treec2af29b0ec3245b87f04292d0281e50cc3281f70 /kernel/power
parentDocumentation: PM: Adjust freezing-of-tasks.rst to the freezer changes (diff)
downloadlinux-e0f4bd26e29bf6162cdc9dc6fb7522bde7b74d07.tar.xz
linux-e0f4bd26e29bf6162cdc9dc6fb7522bde7b74d07.zip
PM: sleep: Remove obsolete comment from unlock_system_sleep()
With the freezer changes introduced by commit f5d39b020809 ("freezer,sched: Rewrite core freezer logic"), the comment in unlock_system_sleep() has become obsolete, there is no need to retain it. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/main.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index f6425ae3e8b0..b1ae9b677d03 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -60,22 +60,6 @@ EXPORT_SYMBOL_GPL(lock_system_sleep);
void unlock_system_sleep(unsigned int flags)
{
- /*
- * Don't use freezer_count() because we don't want the call to
- * try_to_freeze() here.
- *
- * Reason:
- * Fundamentally, we just don't need it, because freezing condition
- * doesn't come into effect until we release the
- * system_transition_mutex lock, since the freezer always works with
- * system_transition_mutex held.
- *
- * More importantly, in the case of hibernation,
- * unlock_system_sleep() gets called in snapshot_read() and
- * snapshot_write() when the freezing condition is still in effect.
- * Which means, if we use try_to_freeze() here, it would make them
- * enter the refrigerator, thus causing hibernation to lockup.
- */
if (!(flags & PF_NOFREEZE))
current->flags &= ~PF_NOFREEZE;
mutex_unlock(&system_transition_mutex);