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 181FEC433EF for ; Thu, 23 Dec 2021 16:20:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 740D86B0073; Thu, 23 Dec 2021 11:20:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6EF496B0074; Thu, 23 Dec 2021 11:20:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5DE996B0075; Thu, 23 Dec 2021 11:20:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0120.hostedemail.com [216.40.44.120]) by kanga.kvack.org (Postfix) with ESMTP id 4E6896B0073 for ; Thu, 23 Dec 2021 11:20:23 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id F064289114 for ; Thu, 23 Dec 2021 16:20:22 +0000 (UTC) X-FDA: 78949571484.20.1E1D42B Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id 4167780035 for ; Thu, 23 Dec 2021 16:20:21 +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=DGJvL8bUMB2uaId69Tgazf7a4NU+KVKfAjwBVfeZ/7s=; b=E/vIccKsYBOscl4TNK96w5S+F/ n89yVdPoDDptRbfZ6ul9Wq7Jkxuyv12cKFp1GRLrpBLNpLxn72VlGfDzezrBlURo87XZjxEhPFKLn x6eP9pbRgDYo5n/oa30ylaFAUlhO//W+5c5HKmkqodLlZeQyx8qKOnxeSdqPEUfGNCPhD7eQF1zAt Rym6UUSMx9OarI1LEjgGIQctKNunpbeRhkKI4KPE1tqmotRqN5WfprDLdiv8xRhUynrNZZ8IVNflG VL1jWv2rRzmLNiaR2rnRWiRL7oihUT+L0a0OdeJh597FV/NwqQYXJAsa1R9pfSwQYQqqEMrHe4sL9 t/NgUihw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0QpF-004PFY-Mm; Thu, 23 Dec 2021 16:20:17 +0000 Date: Thu, 23 Dec 2021 16:20:17 +0000 From: Matthew Wilcox To: Christoph Hellwig Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 25/48] filemap: Add read_cache_folio and read_mapping_folio Message-ID: References: <20211208042256.1923824-1-willy@infradead.org> <20211208042256.1923824-26-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 4167780035 X-Stat-Signature: uguppg6m7jsa4qsq1ya6ouxs55u39rrb Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="E/vIccKs"; dmarc=none; spf=none (imf30.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: 1640276421-939640 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 Thu, Dec 23, 2021 at 03:18:34PM +0000, Matthew Wilcox wrote: > > > +static struct page *do_read_cache_page(struct address_space *mapping, > > > + pgoff_t index, filler_t *filler, void *data, gfp_t gfp) > > > +{ > > > + struct folio *folio = read_cache_folio(mapping, index, filler, data); > > > + if (IS_ERR(folio)) > > > + return &folio->page; > > > + return folio_file_page(folio, index); > > > +} > > > > This drops the gfp on the floor. > > Oops. Will fix. For the record, this fix: - struct folio *folio = read_cache_folio(mapping, index, filler, data); + struct folio *folio; + + folio = do_read_cache_folio(mapping, index, filler, data, gfp);