Skip to content

Commit e0f4bd2

Browse files
haokexinrafaeljw
authored andcommitted
PM: sleep: Remove obsolete comment from unlock_system_sleep()
With the freezer changes introduced by commit f5d39b0 ("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>
1 parent 4bbf0b6 commit e0f4bd2

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

kernel/power/main.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,6 @@ EXPORT_SYMBOL_GPL(lock_system_sleep);
6060

6161
void unlock_system_sleep(unsigned int flags)
6262
{
63-
/*
64-
* Don't use freezer_count() because we don't want the call to
65-
* try_to_freeze() here.
66-
*
67-
* Reason:
68-
* Fundamentally, we just don't need it, because freezing condition
69-
* doesn't come into effect until we release the
70-
* system_transition_mutex lock, since the freezer always works with
71-
* system_transition_mutex held.
72-
*
73-
* More importantly, in the case of hibernation,
74-
* unlock_system_sleep() gets called in snapshot_read() and
75-
* snapshot_write() when the freezing condition is still in effect.
76-
* Which means, if we use try_to_freeze() here, it would make them
77-
* enter the refrigerator, thus causing hibernation to lockup.
78-
*/
7963
if (!(flags & PF_NOFREEZE))
8064
current->flags &= ~PF_NOFREEZE;
8165
mutex_unlock(&system_transition_mutex);

0 commit comments

Comments
 (0)