Message ID | 20210122161941.1080-2-laurentbadel@eaton.com |
---|---|
State | New |
Headers | show |
Series | PM: hibernate: Fix swap file marking | expand |
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!
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)
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(-)