提交 8bd25f81 编写于 作者: L Laurent Badel 提交者: Zheng Zengkai

PM: hibernate: flush swap writer after marking

stable inclusion
from stable-5.10.13
commit c95981ecd9858a4c5da9f6095dbb5f02ef3befec
bugzilla: 47995

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

commit fef9c8d2 upstream.

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

Fixes: 6f612af5 ("PM / Hibernate: Group swap ops")
Signed-off-by: NLaurent Badel <laurentbadel@eaton.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 d1d95e78
...@@ -497,10 +497,10 @@ static int swap_writer_finish(struct swap_map_handle *handle, ...@@ -497,10 +497,10 @@ static int swap_writer_finish(struct swap_map_handle *handle,
unsigned int flags, int error) unsigned int flags, int error)
{ {
if (!error) { if (!error) {
flush_swap_writer(handle);
pr_info("S"); pr_info("S");
error = mark_swapfiles(handle, flags); error = mark_swapfiles(handle, flags);
pr_cont("|\n"); pr_cont("|\n");
flush_swap_writer(handle);
} }
if (error) if (error)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册