Message ID | 20200702182337.GA3762@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=b2Xb=AN=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CD61D14B7 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 2 Jul 2020 18:24:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9A5FF2084C for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 2 Jul 2020 18:24:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="dKwhQogB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A5FF2084C Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C79DA8D0033; Thu, 2 Jul 2020 14:24:04 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C2A0C8D000C; Thu, 2 Jul 2020 14:24:04 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B181E8D0033; Thu, 2 Jul 2020 14:24:04 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0238.hostedemail.com [216.40.44.238]) by kanga.kvack.org (Postfix) with ESMTP id 995C58D000C for <linux-mm@kvack.org>; Thu, 2 Jul 2020 14:24:04 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5CB588248076 for <linux-mm@kvack.org>; Thu, 2 Jul 2020 18:24:04 +0000 (UTC) X-FDA: 76993960008.28.park67_0e0a1d526e8b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 409F96C33 for <linux-mm@kvack.org>; Thu, 2 Jul 2020 18:24:04 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,prvs=445caddfd=anchalag@amazon.com,,RULES_HIT:30012:30054:30064:30069:30070,0,RBL:72.21.196.25:@amazon.com:.lbl8.mailshell.net-66.10.201.10 62.18.0.100;04yf7g7dkon4pkhz9pyi6yogobhjjop3f1ix7n1dstftdh3ioxx5daawzig79qc.q9dkd658of9bwa5pzz5tspe89ih1zsnz7gkactxts8ej3wufw4rxxtzdxbo5kfx.s-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: park67_0e0a1d526e8b X-Filterd-Recvd-Size: 4664 Received: from smtp-fw-2101.amazon.com (smtp-fw-2101.amazon.com [72.21.196.25]) by imf20.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Thu, 2 Jul 2020 18:24:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1593714244; x=1625250244; h=date:from:to:subject:message-id:references:mime-version: in-reply-to; bh=8xWBYHNSqyc0rRCT8ma4wuwSS0bbWLxvstPp4v8IEIQ=; b=dKwhQogBiG38kRTV9cIxd2hom5FJS8v1BFqS6UlOfR57ptUdWzxE/iiV mTxaYJTeEdY9x/aImJn/3xuLNCyKdhwBR3jGW7U/JorU0bhdpGqCosQEg Ncys7NAKZfTYovy7dr2XjxoPh7UQpVSQhu/var/BACXMorIbV8yq9HCm8 8=; IronPort-SDR: sDAToUmcQVKVwVu9eMz0u6grcT4hSIwmjgpl1XIY45YPsfIMhKSq5/2gBLD4pbIvjcoFAEP58A Z+Jgig/wdQNw== X-IronPort-AV: E=Sophos;i="5.75,305,1589241600"; d="scan'208";a="39714105" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1a-715bee71.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 02 Jul 2020 18:24:03 +0000 Received: from EX13MTAUWC001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1a-715bee71.us-east-1.amazon.com (Postfix) with ESMTPS id 23592A25CA; Thu, 2 Jul 2020 18:23:55 +0000 (UTC) Received: from EX13D05UWC001.ant.amazon.com (10.43.162.82) by EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 18:23:37 +0000 Received: from EX13MTAUWC001.ant.amazon.com (10.43.162.135) by EX13D05UWC001.ant.amazon.com (10.43.162.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 18:23:37 +0000 Received: from dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com (172.22.96.68) by mail-relay.amazon.com (10.43.162.232) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 2 Jul 2020 18:23:37 +0000 Received: by dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com (Postfix, from userid 4335130) id 5F90C40844; Thu, 2 Jul 2020 18:23:37 +0000 (UTC) Date: Thu, 2 Jul 2020 18:23:37 +0000 From: Anchal Agarwal <anchalag@amazon.com> To: <tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>, <hpa@zytor.com>, <x86@kernel.org>, <boris.ostrovsky@oracle.com>, <jgross@suse.com>, <linux-pm@vger.kernel.org>, <linux-mm@kvack.org>, <kamatam@amazon.com>, <sstabellini@kernel.org>, <konrad.wilk@oracle.com>, <roger.pau@citrix.com>, <axboe@kernel.dk>, <davem@davemloft.net>, <rjw@rjwysocki.net>, <len.brown@intel.com>, <pavel@ucw.cz>, <peterz@infradead.org>, <eduval@amazon.com>, <sblbir@amazon.com>, <anchalag@amazon.com>, <xen-devel@lists.xenproject.org>, <vkuznets@redhat.com>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <dwmw@amazon.co.uk>, <benh@kernel.crashing.org> Subject: [PATCH v2 11/11] PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA Message-ID: <20200702182337.GA3762@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> References: <cover.1593665947.git.anchalag@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <cover.1593665947.git.anchalag@amazon.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Rspamd-Queue-Id: 409F96C33 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Fix PM hibernation in Xen guests
|
expand
|
diff --git a/kernel/power/user.c b/kernel/power/user.c index d5eedc2baa2a..e1209cefc103 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -242,8 +242,12 @@ static int snapshot_set_swap_area(struct snapshot_data *data, return -EINVAL; } data->swap = swap_type_of(swdev, offset, &bdev); - if (data->swap < 0) + if (data->swap < 0) { return -ENODEV; + } else { + swsusp_resume_device = swdev; + swsusp_resume_block = offset; + } data->bd_inode = bdev->bd_inode; bdput(bdev);