Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp630252pxb; Tue, 2 Feb 2021 13:44:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJypfZrbeBoFl1/hwfxz+Fn/13gGSpMavWjFo+SwMGvnrzyLNUr1xM4f/vPB9pUE8VMwc39h X-Received: by 2002:a05:6402:3042:: with SMTP id bu2mr110752edb.320.1612302295839; Tue, 02 Feb 2021 13:44:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612302295; cv=none; d=google.com; s=arc-20160816; b=XPGynSC3j6C10XRGJMy8BG1cbrK3bePGrDFHR8JLzMP8YOnOi/5dSaC+qYYFQnFt2X eWkinAyIIIo8OpQaV80DP+Y9CpiPyB5zp1IWac9MN40Jze+/LXhO4CeG55yTHKYgGZHX dBKu74G2JU+rljdNCgH/xKiZlZE89ulyDwOb0sinoyRm2iYfTRl/umB5I8B6MCUxI0eK 00McABJJdS6NZov18AFBqXcDhc3PBbQnpTr2i1s337bGZxLRFPwgIVfXlFPsY3dTZzD6 hADhqcMbbHig76F228TKbHJDQMLYFK3b/f2JjID5oUgCxAEMeBAZ4Jww0DMWk0FORn5R rAKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=O5OKOCcOomEujcGF7gICErzCdzHaMl5jUjoKZ0X4Ovc=; b=IBmWPuj5pGRuAwTjG+vfb7GcaWf5VP3oxkvorgOF8b/E4KNSZZ6hrgh+o0u6gTUgTh UmKgfpGP9NKXqqylGezUtCIsozMYWIX4WTUX8Ls9b7WlKTeWK/ukvfRQbG7wUTomBfeq 9RXAz3gmaderJ/E6914KR7cn1hkr4BZdXdB4c8n8RaosNLus/lzlyDuTQs871b7aJWVa mxgw0eqxQIkDZzyNMVMyEs5tj/4Fw+XuI+FZmJfWsGuFzBobUyzKuvHH875nvjY9wWmr fh1+fywszDWs8o/XDvjT+QikF7/oV5YjbUplt15zaL+v4mEP5Ewy7FeY58GyWZ4+guq8 R6rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="DmPE/Y+C"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dv16si57296ejb.226.2021.02.02.13.44.20; Tue, 02 Feb 2021 13:44:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="DmPE/Y+C"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233001AbhBBNuu (ORCPT + 99 others); Tue, 2 Feb 2021 08:50:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:38094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232586AbhBBNpb (ORCPT ); Tue, 2 Feb 2021 08:45:31 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C10F464F78; Tue, 2 Feb 2021 13:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273237; bh=On842wo4B1abL+3Jo5pYPEus1clZ7LjryN1fx0AQh2k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DmPE/Y+CLWFnI0NZ09mZPoN9EJUQCTH2zZdaig4g+6xHdgSIwjGaOwq4nCwW9S6tb Jahxl4dlkpfeddhDaula1rqGI+IH7JEbLBwo4PQ2eN/EIHg5UgTKODP8160RKy3bTn h2vnGUJmO8l8tT+lB0qLsPL/JPnEGft/axQy0Ey8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laurent Badel , "Rafael J. Wysocki" Subject: [PATCH 5.10 031/142] PM: hibernate: flush swap writer after marking Date: Tue, 2 Feb 2021 14:36:34 +0100 Message-Id: <20210202132958.991954316@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Laurent Badel 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 Cc: All applicable Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- kernel/power/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -497,10 +497,10 @@ static int swap_writer_finish(struct swa 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)