diff options
author | Laurent Badel <laurentbadel@eaton.com> | 2021-01-22 17:19:41 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-03 23:25:57 +0100 |
commit | 53fd4e4003a664c426dd54e19f262cb97e9eb6f9 (patch) | |
tree | d78a91520ccdf965de0e3b19d77fee4008e78692 /kernel/power | |
parent | 7f9a267c67af9f8bbcc612ef609dfa29ffb8a042 (diff) |
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 <laurentbadel@eaton.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/swap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index ca0fcb5ced71..0516c422206d 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -489,10 +489,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) |