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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 612FAC49EA7 for ; Mon, 28 Jun 2021 06:09:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F14A61466 for ; Mon, 28 Jun 2021 06:09:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231723AbhF1GMH (ORCPT ); Mon, 28 Jun 2021 02:12:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229778AbhF1GMG (ORCPT ); Mon, 28 Jun 2021 02:12:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1DC1C061574; Sun, 27 Jun 2021 23:09:41 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.