mirror of https://github.com/torvalds/linux.git
Allow pm_restrict_gfp_mask() to be called many times in a row to avoid issues with calling dpm_suspend_start() when the GFP mask has been already restricted. Only the first invocation of pm_restrict_gfp_mask() will actually restrict the GFP mask and the subsequent calls will warn if there is a mismatch between the expected allowed GFP mask and the actual one. Moreover, if pm_restrict_gfp_mask() is called many times in a row, pm_restore_gfp_mask() needs to be called matching number of times in a row to actually restore the GFP mask. Calling it when the GFP mask has not been restricted will cause it to warn. This is necessary for the GFP mask restriction starting in hibernation_snapshot() to continue throughout the entire hibernation flow until it completes or it is aborted (either by a wakeup event or by an error). Fixes: |
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| autosleep.c | ||
| console.c | ||
| energy_model.c | ||
| hibernate.c | ||
| main.c | ||
| power.h | ||
| poweroff.c | ||
| process.c | ||
| qos.c | ||
| snapshot.c | ||
| suspend.c | ||
| suspend_test.c | ||
| swap.c | ||
| user.c | ||
| wakelock.c | ||