All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Badel <laurentbadel@eaton.com>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Pavel Machek <pavel@ucw.cz>, <linux-pm@vger.kernel.org>
Cc: Laurent Badel <laurentbadel@eaton.com>
Subject: [PATCH 1/1] PM: hibernate: flush swap writer after marking
Date: Fri, 22 Jan 2021 17:19:41 +0100	[thread overview]
Message-ID: <20210122161941.1080-2-laurentbadel@eaton.com> (raw)
In-Reply-To: <20210122161941.1080-1-laurentbadel@eaton.com>

Flush the swap writer after, not before, marking the files, to ensure the
signature is properly written. 

Signed-off-by: Laurent Badel <laurentbadel@eaton.com>
---
 kernel/power/swap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



-----------------------------
Eaton Industries Manufacturing GmbH ~ Registered place of business: Route de la Longeraie 7, 1110, Morges, Switzerland 

-----------------------------


  reply	other threads:[~2021-01-22 16:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 16:19 [PATCH 0/1] PM: hibernate: Fix swap file marking Laurent Badel
2021-01-22 16:19 ` Laurent Badel [this message]
2021-01-25 17:55   ` [PATCH 1/1] PM: hibernate: flush swap writer after marking Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210122161941.1080-2-laurentbadel@eaton.com \
    --to=laurentbadel@eaton.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.