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 <laurentbadel@eaton.com> Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 56c91a1 commit fef9c8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎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)