From patchwork Wed Apr 2 21:06:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 14036488 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 CF85DC3601E for ; Wed, 2 Apr 2025 21:06:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B7A82280008; Wed, 2 Apr 2025 17:06:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 99EFA280003; Wed, 2 Apr 2025 17:06:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 841B2280008; Wed, 2 Apr 2025 17:06:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 64BE6280003 for ; Wed, 2 Apr 2025 17:06:22 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D3082C0805 for ; Wed, 2 Apr 2025 21:06:23 +0000 (UTC) X-FDA: 83290337046.01.8A7CB52 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf21.hostedemail.com (Postfix) with ESMTP id 4A05D1C000E for ; Wed, 2 Apr 2025 21:06:22 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=E2XzTSoy; spf=none (imf21.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743627982; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9u8Vjz9C0E4LvrVZKlU/rxeiFIcc78vR/nB2GrB7LV8=; b=7C/E/qCCV2lA3B2UEZ88mKLEoYc6JAcNDVndYI+N5+osCNAh237GsyiU1EytQv8fpk7toS NN+U2iO1Vu27pbnUC8XTFaDQQP8K+sq/VdLA7Yu7C/1EOuHnigAHYnF4jZB/cBmy/9TOEN sbbXSrVrZrdvEaxjYK00QkWRS/SIvwo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743627982; a=rsa-sha256; cv=none; b=pvwMB0sJ180hUDf2TU7reY0Szdcz7ohawpGhVEmIoiryZ3C1txFRZuSRs45ojIOtVZC5hJ QIAWcmm9FQ4J99bK8KvemR17cuKADPlOmEMmSPFtWDKan7NcnTWYfStP02UNZ0BH7vCeX7 zAEguOzRXZl7F5PR+pn7Gr1KbR/HFB0= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=E2XzTSoy; spf=none (imf21.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none 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=9u8Vjz9C0E4LvrVZKlU/rxeiFIcc78vR/nB2GrB7LV8=; b=E2XzTSoyxW912FP5dXOOzZxQnK mExtIKyJWSjZM0kAHZhVxiU6tOokazeU0Fe7GY2ZCRp8J0gcloVL0CXUWtcUwHS/a2dB/KpS2V5l6 gWF4ytOrvykWlTrBmqXA2YzYU2nl/Mt58FBI9TeNkn7I6jpvjYwFGvxDQNbVeVJuBLmZYT4Kctmep USgKIRGGErnVEPFqSM8fqIm1dZQYMWCtqy5Ng0YQstNSUBMsQbbHkAGdSH16g4+IkV0pO4jSLhGje BvefpRZIwGGgmBoy1av3RWCKJ8hxWI2QiyPCh2KIxF1S1MEcin/0ffQoJapCsrAZn7uT252TrDRXJ D8NixFtg==; Received: from willy by casper.infradead.org with local (Exim 4.98.1 #2 (Red Hat Linux)) id 1u05Hr-0000000AFqU-0V6p; Wed, 02 Apr 2025 21:06:15 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 5/8] filemap: Remove find_subpage() Date: Wed, 2 Apr 2025 22:06:07 +0100 Message-ID: <20250402210612.2444135-6-willy@infradead.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250402210612.2444135-1-willy@infradead.org> References: <20250402210612.2444135-1-willy@infradead.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 4A05D1C000E X-Stat-Signature: p56zwia7iwzyaeuhfnngqafjio5ktj65 X-HE-Tag: 1743627982-315000 X-HE-Meta: U2FsdGVkX1+XuXI1VHq6lAuFUGwl0jivyhoLcVMH+7v/RfCOoLLDETQ5V7UwboBlWTcICFee01oW9CAc41VeiB+j7IqqGlwXe9fmOh5irL9Qce/aq0Ll0GP2jsxW6oLUQzh7q0919TrxcZJoD+aCmXq92xWYzyj/66JPN2eejAHsQ9HTz5Y/GMQWZFBwTen4B29+OQq2nQdisSEKjLBet1+psl9OfvJXklvZB5/xeXif650XnzJManmOPsqMDvm9QDJi6LwdrfbzQ+hgLDj4RqS7AIsjJ/isY2LI4XuAkjRbCHOyEZrVNHbhzRSTo0dmftfXmB1kEbF8wtmMJNnyPgbcyX8XAVM4urqk/tstgxNaBGrnYgQAHn6tNXxyrwiGIm+yBaLgeDTDYK8fyElF5YfJuHDzpJKWIcxUbkLtaYfYiOPOQeRZ+1AfzsBEpFbLyqxwiWrQOmJVbPtyB+6HHpGN1dLw8sBY/T6rEacH1ZIhxlhozsO+Ezy8YY5smiw5/RSEhMbqCtB2AMWH76P+V4ZZZw2dsYdm70PEMY8Ihg9jdjS6RkbN3xVOuIGb6PhRax5kmehlZ3DyJT87qA18RySDXQEgj1g8v8yyH73mByCyrWxoSTuaBqWWPaOd9qVXvyt+UIOxniWbF/aaWsBP47SpubM+pPkade6GQwCqfyYw0mU+dXqzWDzmvTEbHFIT70ilsSAkFLlJkjssfr/gqhzWYd+gMb0GeYAoB6CmlFi6jRgWsZh4oTnVi7tEwHZ3sUwao6u4YGzpUThvnwzc/SJrGvLX/gTd29ux6pnil7SDN0tPE/heG5dSWjCLn8P9ijfP4fy//jn0VTmblf0IBLQTt0+qOK5IWL8TJ8I3pDkmcJzbX4e2YdXndiZ7bZm0BhoG1vxuyovy9J3KURPOG1vsX5/G8Ic8WIa3HrMJELyh/A8hF1hC5QvhYlOrCBF3iNejkge+IXb13qYDs8C UAPuV+Xn IUZ4+5WupdxagGQ61EZJoafaJavG6Wpm5NIK1PnW+c9ol+jzG9AW5vFNSdl7d178QBraLnbZ0Z0qfZ6cvOYGMoLtQBFXqhWJTrXWafiVumgoHsf12kaRrov6WFNqo43SVs0v7JYQ1iqno0HL3lbMG0r7iUAU6tdquGqBl11C1jAoEf7TGs5so4J0qSN1yLwTaQqWXid7eY7UMH/UZXHl4ZBaXW0VoisAUL/HdJ9oPys3/iwA1r40U/lb7bDV5Yn2LUxZrdc+JZhIIHnycKvogyuHKDIqOIztHmTxy 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: List-Subscribe: List-Unsubscribe: All users of this function now call folio_file_page() instead. Delete it. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/pagemap.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index cd4bd0f8e5f6..0ddd4bd8cdf8 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -945,19 +945,6 @@ static inline bool folio_contains(struct folio *folio, pgoff_t index) return index - folio_index(folio) < folio_nr_pages(folio); } -/* - * Given the page we found in the page cache, return the page corresponding - * to this index in the file - */ -static inline struct page *find_subpage(struct page *head, pgoff_t index) -{ - /* HugeTLBfs wants the head page regardless */ - if (PageHuge(head)) - return head; - - return head + (index & (thp_nr_pages(head) - 1)); -} - unsigned filemap_get_folios(struct address_space *mapping, pgoff_t *start, pgoff_t end, struct folio_batch *fbatch); unsigned filemap_get_folios_contig(struct address_space *mapping,