From patchwork Mon Jan 10 04:23:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12708173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 771F7C433F5 for ; Mon, 10 Jan 2022 04:24:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 680B26B007E; Sun, 9 Jan 2022 23:24:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E0906B0080; Sun, 9 Jan 2022 23:24:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 436366B0082; Sun, 9 Jan 2022 23:24:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0125.hostedemail.com [216.40.44.125]) by kanga.kvack.org (Postfix) with ESMTP id 190CE6B007E for ; Sun, 9 Jan 2022 23:24:22 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id BC5DD824C421 for ; Mon, 10 Jan 2022 04:24:21 +0000 (UTC) X-FDA: 79013085522.09.CBD1B33 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf17.hostedemail.com (Postfix) with ESMTP id 59EC94000D for ; Mon, 10 Jan 2022 04:24:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=fC4mfcf/XAHzYtj0vYWgXRylAg3qW7XjyC6jR63n0ws=; b=G8FxiLvPsae9GR/t85Spn5ZHFx YOtLGi7JPPDzlItCRlMqM6B76CuawBJ6HkD3SK7XQsfLpIrVcPhRbhsBvt0CCRGHMGkW7MJXtimh3 vnqAYCyMjelK5u8jFMEkFjMxjzOL7WoHidac+q474yFVCn47qhdjhoFhIdMEpIFd6t9LZV3Q6scZv +d5KpY89Mw0mw09jWK8SF+Ix0odXuP9dWx+xHAz7W8mgpPaz1hCCnPs+/RNEP1G97LlLqlnz6aqX3 4Ny9Lsn0lGlLjRQWNF4iiaiYJ73Q47X8bemQGmMp0HFLgAvtvFZdjZgTcIHNs+EPBU6zaylj6iih9 IEzUEUAg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6mE9-0025x2-Al; Mon, 10 Jan 2022 04:24:13 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , John Hubbard , Christoph Hellwig , William Kucharski , linux-kernel@vger.kernel.org, Jason Gunthorpe Subject: [PATCH v2 19/28] gup: Convert try_grab_page() to call try_grab_folio() Date: Mon, 10 Jan 2022 04:23:57 +0000 Message-Id: <20220110042406.499429-20-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220110042406.499429-1-willy@infradead.org> References: <20220110042406.499429-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 59EC94000D X-Stat-Signature: yauhjnzhpxmqeutnjepotaaimwijjmku Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=G8FxiLvP; dmarc=none; spf=none (imf17.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam11 X-HE-Tag: 1641788661-769583 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: try_grab_page() only cares about success or failure, not about the type returned. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: John Hubbard --- mm/gup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/gup.c b/mm/gup.c index 20703de2f107..c3e514172eaf 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -192,7 +192,7 @@ bool __must_check try_grab_page(struct page *page, unsigned int flags) if (!(flags & (FOLL_GET | FOLL_PIN))) return true; - return try_grab_compound_head(page, 1, flags); + return try_grab_folio(page, 1, flags); } /**