From mboxrd@z Thu Jan 1 00:00:00 1970 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 994D8C433EF for ; Fri, 4 Feb 2022 20:21:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 44E196B0075; Fri, 4 Feb 2022 15:21:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D6366B0078; Fri, 4 Feb 2022 15:21:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 22C306B007B; Fri, 4 Feb 2022 15:21:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0018.hostedemail.com [216.40.44.18]) by kanga.kvack.org (Postfix) with ESMTP id F219F6B0075 for ; Fri, 4 Feb 2022 15:21:32 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id AD4A59A26A for ; Fri, 4 Feb 2022 20:21:32 +0000 (UTC) X-FDA: 79106217624.09.998E795 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf03.hostedemail.com (Postfix) with ESMTP id 3F9A62000C for ; Fri, 4 Feb 2022 20:21:32 +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=K6uEGcItdUrB9ALQsjiHycs0qsgg2DOtdk6zEZO9ZH8=; b=n73jIEwQuwyZQTxixXDE8DRSEr fymqdlimxMnwCcTSv9IuxYl8sQKA1JpD3eEiuccMG3IEFT1HYjS49KzfF8/U3PDltvy57wCBPsWnt YH9eWWCKO/9VWIPK/769yE5J2l/fkKh8/0mjj/29nQvVIb9w91hacHHFwUODHw0hi6iTQckvL/FGy cR2iY8AtuFjx3wjyadcFYGX7PNz/V+QWgojvvSEih07ec1P2NxoE+n8YgNghDcUzQjX5jNMazCymo D1gtZd8j8zkO5OMRtBd8p2woBnoLJ36NO9gvRXF6DnKmHL05PDJ85v4baLqEOksFNHcRp0IQnwW2l H4jaf5vA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nG4jV-007Llh-3D; Fri, 04 Feb 2022 19:59:01 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org, Christoph Hellwig , John Hubbard , Jason Gunthorpe , William Kucharski Subject: [PATCH 17/75] mm: Remove page_cache_add_speculative() and page_cache_get_speculative() Date: Fri, 4 Feb 2022 19:57:54 +0000 Message-Id: <20220204195852.1751729-18-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220204195852.1751729-1-willy@infradead.org> References: <20220204195852.1751729-1-willy@infradead.org> MIME-Version: 1.0 X-Rspam-User: nil X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 3F9A62000C X-Stat-Signature: nd6g3oi4the74jr9gad87zb1mbe5mrch Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=n73jIEwQ; dmarc=none; spf=none (imf03.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-HE-Tag: 1644006092-991934 Content-Transfer-Encoding: quoted-printable 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: These wrappers have no more callers, so delete them. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: John Hubbard Reviewed-by: Jason Gunthorpe Reviewed-by: William Kucharski --- include/linux/mm.h | 7 +++---- include/linux/pagemap.h | 10 ---------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index a29dacec7294..703bc2ec40a9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1258,10 +1258,9 @@ static inline void put_page(struct page *page) * applications that don't have huge page reference counts, this won't b= e an * issue. * - * Locking: the lockless algorithm described in page_cache_get_speculati= ve() - * and page_cache_gup_pin_speculative() provides safe operation for - * get_user_pages and page_mkclean and other calls that race to set up p= age - * table entries. + * Locking: the lockless algorithm described in folio_try_get_rcu() + * provides safe operation for get_user_pages(), page_mkclean() and + * other calls that race to set up page table entries. */ #define GUP_PIN_COUNTING_BIAS (1U << 10) =20 diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 270bf5136c34..cdb3f118603a 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -283,16 +283,6 @@ static inline struct inode *folio_inode(struct folio= *folio) return folio->mapping->host; } =20 -static inline bool page_cache_add_speculative(struct page *page, int cou= nt) -{ - return folio_ref_try_add_rcu((struct folio *)page, count); -} - -static inline bool page_cache_get_speculative(struct page *page) -{ - return page_cache_add_speculative(page, 1); -} - /** * folio_attach_private - Attach private data to a folio. * @folio: Folio to attach data to. --=20 2.34.1