Skip to content

Commit fef9c8d

Browse files
laurentbadel-eatonrafaeljw
authored andcommitted
PM: hibernate: flush swap writer after marking
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]>
1 parent 56c91a1 commit fef9c8d

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
@@ -497,10 +497,10 @@ static int swap_writer_finish(struct swap_map_handle *handle,
497497
unsigned int flags, int error)
498498
{
499499
if (!error) {
500-
flush_swap_writer(handle);
501500
pr_info("S");
502501
error = mark_swapfiles(handle, flags);
503502
pr_cont("|\n");
503+
flush_swap_writer(handle);
504504
}
505505

506506
if (error)

0 commit comments

Comments
 (0)