Skip to content

Commit 668fd82

Browse files
laurentbadel-eatonksacilotto
authored andcommitted
PM: hibernate: flush swap writer after marking
BugLink: https://bugs.launchpad.net/bugs/1916056 commit fef9c8d upstream. Flush the swap writer after, not before, marking the files, to ensure the signature is properly written. Fixes: 6f612af ("PM / Hibernate: Group swap ops") Signed-off-by: Laurent Badel <[email protected]> Cc: All applicable <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent 0d12a26 commit 668fd82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/power/swap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,10 +489,10 @@ static int swap_writer_finish(struct swap_map_handle *handle,
489489
unsigned int flags, int error)
490490
{
491491
if (!error) {
492-
flush_swap_writer(handle);
493492
pr_info("S");
494493
error = mark_swapfiles(handle, flags);
495494
pr_cont("|\n");
495+
flush_swap_writer(handle);
496496
}
497497

498498
if (error)

0 commit comments

Comments
 (0)