From patchwork Sun Dec 1 01:53:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 11268331 Return-Path: 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 06DB9112B for ; Sun, 1 Dec 2019 01:53:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BE242208C3 for ; Sun, 1 Dec 2019 01:53:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="eeBSCU0N" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE242208C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9F1226B02F1; Sat, 30 Nov 2019 20:53:57 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9C6D46B02F3; Sat, 30 Nov 2019 20:53:57 -0500 (EST) 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 8DC6C6B02F4; Sat, 30 Nov 2019 20:53:57 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0231.hostedemail.com [216.40.44.231]) by kanga.kvack.org (Postfix) with ESMTP id 7693F6B02F1 for ; Sat, 30 Nov 2019 20:53:57 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 2A438824999B for ; Sun, 1 Dec 2019 01:53:57 +0000 (UTC) X-FDA: 76214901714.17.beef69_227656ece543f X-Spam-Summary: 2,0,0,bd5d8e1a29f475c0,d41d8cd98f00b204,akpm@linux-foundation.org,:akpm@linux-foundation.org:cai@lca.pw:dan.j.williams@intel.com:david@redhat.com:haiyangz@microsoft.com:kys@microsoft.com::mhocko@suse.com:mm-commits@vger.kernel.org:osalvador@suse.com:pasha.tatashin@soleen.com:richard.weiyang@gmail.com:sashal@kernel.org:sthemmin@microsoft.com:torvalds@linux-foundation.org,RULES_HIT:41:355:379:800:960:966:967:973:988:989:1260:1263:1345:1381:1431:1437:1534:1541:1711:1730:1747:1777:1792:1981:2194:2196:2199:2200:2393:2525:2559:2563:2682:2685:2693:2741:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3865:3866:3871:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4385:5007:6261:6653:6737:7514:7576:7688:7875:8599:9025:9545:10004:10913:11026:11658:11914:12043:12048:12114:12297:12438:12517:12519:12555:12679:12783:12986:13069:13311:13357:13846:14181:14384:14721:14849:21080:21251:21451:21627:21939:30054:30064,0,RBL:error,CacheIP:n one,Baye X-HE-Tag: beef69_227656ece543f X-Filterd-Recvd-Size: 2760 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Sun, 1 Dec 2019 01:53:56 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9633D2084D; Sun, 1 Dec 2019 01:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575165236; bh=uzkjNw7nlXKxuYMEBOjO5vWqtzK10nvWinwiOo3AsJw=; h=Date:From:To:Subject:From; b=eeBSCU0NanfGUGGuKuqBcY+o284BV/PbNOVKFYIzwszR0attMvN8Gf7Sk2gE2jq/W al0f4uTeRogFCJgsBaHBZvrOCtqiOeWZV06iT06NPtKDZhdG4+fQZk5AcOtU+vbduf PI9G2v2I/Vcacdt1728f1p+fKKofHz7RXhulPg24= Date: Sat, 30 Nov 2019 17:53:55 -0800 From: akpm@linux-foundation.org To: akpm@linux-foundation.org, cai@lca.pw, dan.j.williams@intel.com, david@redhat.com, haiyangz@microsoft.com, kys@microsoft.com, linux-mm@kvack.org, mhocko@suse.com, mm-commits@vger.kernel.org, osalvador@suse.com, pasha.tatashin@soleen.com, richard.weiyang@gmail.com, sashal@kernel.org, sthemmin@microsoft.com, torvalds@linux-foundation.org Subject: [patch 077/158] hv_balloon: use generic_online_page() Message-ID: <20191201015355.jHjwCMvVx%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 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: From: David Hildenbrand Subject: hv_balloon: use generic_online_page() Let's use the generic onlining function - which will now also take care of calling kernel_map_pages(). Link: http://lkml.kernel.org/r/20190909114830.662-3-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Dan Williams Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Qian Cai Cc: Wei Yang Signed-off-by: Andrew Morton --- drivers/hv/hv_balloon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/hv/hv_balloon.c~hv_balloon-use-generic_online_page +++ a/drivers/hv/hv_balloon.c @@ -681,8 +681,7 @@ static void hv_page_online_one(struct hv /* This frame is currently backed; online the page. */ __online_page_set_limits(pg); - __online_page_increment_counters(pg); - __online_page_free(pg); + generic_online_page(pg, 0); lockdep_assert_held(&dm_device.ha_lock); dm_device.num_pages_onlined++;