From: Laurent Badel Date: Fri, 22 Jan 2021 16:19:41 +0000 (+0100) Subject: PM: hibernate: flush swap writer after marking X-Git-Tag: v4.19.173~28 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=13d6c27d1030a2ae238dce7f8da59091a3ad0bba;p=users%2Fdwmw2%2Flinux.git PM: hibernate: flush swap writer after marking commit fef9c8d28e28a808274a18fbd8cc2685817fd62a upstream. Flush the swap writer after, not before, marking the files, to ensure the signature is properly written. Fixes: 6f612af57821 ("PM / Hibernate: Group swap ops") Signed-off-by: Laurent Badel Cc: All applicable Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/power/swap.c b/kernel/power/swap.c index d7f6c1a288d33..e9494c29f1ca4 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -491,10 +491,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)