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.6 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 13657C2B9F4 for ; Mon, 28 Jun 2021 06:09:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B73DD61440 for ; Mon, 28 Jun 2021 06:09:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B73DD61440 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 025038D001F; Mon, 28 Jun 2021 02:09:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F3F738D0016; Mon, 28 Jun 2021 02:09:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E05C18D001F; Mon, 28 Jun 2021 02:09:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0213.hostedemail.com [216.40.44.213]) by kanga.kvack.org (Postfix) with ESMTP id AEAF38D0016 for ; Mon, 28 Jun 2021 02:09:56 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 96CCA160C6 for ; Mon, 28 Jun 2021 06:09:56 +0000 (UTC) X-FDA: 78302106792.06.7F788FA Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id C0E94E000253 for ; Mon, 28 Jun 2021 06:09:55 +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=BJQH8ExqyG+PaKnx7zyfiS+jgoJEuon+FRVA2gAuWXM=; b=qHL5isZbk+RSlqlOVauQ1UEPt/ Qsg78G4uDqlluI+9DaMWUoyWCsxLI0HfvdOtzdlMRwW/EU7G1g4fuguZnC+icIvNYeD7cZz+vsu35 5oXECD34kNiWhGrPc1DwxS2bVvk006UxAhT1GWq/6JWXh2il4yB+z9Mcx0CAJdrTPnYyVQysK1OYu SaLNrbV2FP9q2fRx/ZKlhygIqE9mU/BkuPNbdAEMknkuNFjPqTjCGVwGFqNeSTA29JIwC+tQSimJq Kwdiv4vRWnHJY7EKequNdSQ5HI2/+vpU5JUiKVVxWGiYBbQnHz+DlMitqjiGDyDWZYxQ3ekTZQtMR RXV0Rifg==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxkQV-002dr2-Uq; Mon, 28 Jun 2021 06:07:34 +0000 Date: Mon, 28 Jun 2021 07:07:23 +0100 From: Christoph Hellwig To: Matthew Wilcox Cc: Christoph Hellwig , 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: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=qHL5isZb; dmarc=none; spf=none (imf30.hostedemail.com: domain of BATV@casper.srs.infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=BATV@casper.srs.infradead.org X-Stat-Signature: bcnakq6859xgetap6e7ayjfesfqotp43 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C0E94E000253 X-HE-Tag: 1624860595-725313 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 Fri, Jun 25, 2021 at 04:29:47AM +0100, Matthew Wilcox 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. Much better, thanks.