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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA083C49EA5 for ; Fri, 25 Jun 2021 03:30:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 765C8613FB for ; Fri, 25 Jun 2021 03:30:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 765C8613FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1A88D6B0036; Thu, 24 Jun 2021 23:30:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1592C6B005D; Thu, 24 Jun 2021 23:30:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 020076B006C; Thu, 24 Jun 2021 23:30:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id C4C936B0036 for ; Thu, 24 Jun 2021 23:30:09 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D7F5F180163A1 for ; Fri, 25 Jun 2021 03:30:09 +0000 (UTC) X-FDA: 78290817738.27.32C13C2 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf16.hostedemail.com (Postfix) with ESMTP id 3472E8019358 for ; Fri, 25 Jun 2021 03:30:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8Vwxl6D+Lu5QRVNKMZe3vjsqCEkLlWvK03dV0gQsJgc=; b=m12G3Jb5Y4Qzg5nzgbooeJEl4s MIMbrukKcUeNXFS1nEC68bFJkME+fS3l8VEZHJ+Vc9S/JeKcG8zmZe8+HEL6ueR8EOgYvSRXA3UVK j9+WiAJUOPGjDmg02FLwGrriME7+WN0IM9rwHc2W/Wm32aDBbZjTPOtG3bLaxPo+COyomyd2kZTCi EZNKP0H/PMSf/9kkGlcnbl9YdujprhtBTRV6C+X0zfMG6rmraM40lZfqqSCaEf6R/w0Ym5SEk290B Mm/kWBbyBojr7NkpnzhMmaKABJ2jrRf/qSEmRVQAJYSB6r4z3/3YVK2kccDva4cHt3i/lM+n8+DU6 H3vKQcrw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwcXL-00HGUW-4U; Fri, 25 Jun 2021 03:29:50 +0000 Date: Fri, 25 Jun 2021 04:29:47 +0100 From: Matthew Wilcox To: Christoph Hellwig Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 44/46] mm/filemap: Convert mapping_get_entry to return a folio Message-ID: References: <20210622121551.3398730-1-willy@infradead.org> <20210622121551.3398730-45-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=m12G3Jb5; spf=none (imf16.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: 9koxec837qo8w48k38smxw9j8ioty4hi X-Rspamd-Queue-Id: 3472E8019358 X-Rspamd-Server: rspam06 X-HE-Tag: 1624591809-822043 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: On Wed, Jun 23, 2021 at 01:32:39PM +0200, Christoph Hellwig wrote: > On Tue, Jun 22, 2021 at 01:15:49PM +0100, Matthew Wilcox (Oracle) wrote: > > - * Return: The head page or shadow entry, %NULL if nothing is found. > > + * Return: The folio, swap or shadow entry, %NULL if nothing is found. > > This (old and new) reads a little weird, given that it returns a > struct folio, even if that happens to be a magic entry. Yeah. How about this? - * Return: The head page or shadow entry, %NULL if nothing is found. + * Return: The folio, swap or shadow entry, %NULL if nothing is found. */ -static struct page *mapping_get_entry(struct address_space *mapping, - pgoff_t index) +static void *mapping_get_entry(struct address_space *mapping, pgoff_t index) { I still use a struct folio in mapping_get_entry(), but this means that pagecache_get_page() doesn't change in this patch.