WSL2-Linux-Kernel/kernel/power
Evan Green 88a5045f17 PM: hibernate: Fix snapshot partial write lengths
snapshot_write() is inappropriately limiting the amount of data that can
be written in cases where a partial page has already been written. For
example, one would expect to be able to write 1 byte, then 4095 bytes to
the snapshot device, and have both of those complete fully (since now
we're aligned to a page again). But what ends up happening is we write 1
byte, then 4094/4095 bytes complete successfully.

The reason is that simple_write_to_buffer()'s second argument is the
total size of the buffer, not the size of the buffer minus the offset.
Since simple_write_to_buffer() accounts for the offset in its
implementation, snapshot_write() can just pass the full page size
directly down.

Signed-off-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-11-24 13:50:18 +01:00
..
Kconfig PM: sleep: remove trailing spaces and tabs 2021-06-11 18:49:09 +02:00
Makefile PM: hibernate: Split off snapshot dev option 2020-05-19 17:48:08 +02:00
autosleep.c PM: sleep: fix typos in comments 2021-04-08 19:37:21 +02:00
console.c
energy_model.c PM: EM: Mark inefficiencies in CPUFreq 2021-10-05 16:33:05 +02:00
hibernate.c PM: hibernate: use correct mode for swsusp_close() 2021-11-24 13:45:54 +01:00
main.c PM: sleep: unmark 'state' functions as kernel-doc 2021-08-16 18:49:39 +02:00
power.h PM: sleep: Pause cpuidle later and resume it earlier during system transitions 2021-10-26 15:52:07 +02:00
poweroff.c
process.c workqueue: Introduce show_one_worker_pool and show_one_workqueue. 2021-10-20 06:19:03 -10:00
qos.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
snapshot.c PM: hibernate: remove leading spaces before tabs 2021-06-11 18:52:05 +02:00
suspend.c PM: suspend: Use valid_state() consistently 2021-10-26 15:52:58 +02:00
suspend_test.c PM: sleep: check RTC features instead of ops in suspend_test 2021-08-04 20:23:05 +02:00
swap.c PM: hibernate: Get block device exclusively in swsusp_check() 2021-10-21 19:38:32 +02:00
user.c PM: hibernate: Fix snapshot partial write lengths 2021-11-24 13:50:18 +01:00
wakelock.c