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

On Fri, Jan 22, 2021 at 5:49 PM Laurent Badel <laurentbadel@eaton.com> wrote:
>
> 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)
> --

Applied as 5.11-rc material, thanks!

      reply	other threads:[~2021-01-25 18:01 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 ` [PATCH 1/1] PM: hibernate: flush swap writer after marking Laurent Badel
2021-01-25 17:55   ` Rafael J. Wysocki [this message]

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=CAJZ5v0g75M8tMs3EqAa0Nb2z-41eg6kovm1WOZKOZ5Q4SGwbkw@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=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.