Skip to content

Commit

Permalink
PM: hibernate: flush swap writer after marking
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
laurentbadel-eaton authored and rafaeljw committed Jan 25, 2021
1 parent 56c91a1 commit fef9c8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/power/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,10 @@ static int swap_writer_finish(struct swap_map_handle *handle,
unsigned int flags, int error)
{
if (!error) {
flush_swap_writer(handle);
pr_info("S");
error = mark_swapfiles(handle, flags);
pr_cont("|\n");
flush_swap_writer(handle);
}

if (error)
Expand Down

0 comments on commit fef9c8d

Please sign in to comment.