summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLaurent Badel <laurentbadel@eaton.com>2021-01-22 17:19:41 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-01-25 18:52:30 +0100
commitfef9c8d28e28a808274a18fbd8cc2685817fd62a (patch)
treefd4fbce60a5fb846181794d0b9486cbe2e0fd978 /kernel
parent56c91a18432b631ca18438841fd1831ef756cabf (diff)
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: 6f612af57821 ("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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/swap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index c73f2e295167..72e33054a2e1 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -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)