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 8DECCC433EF for ; Thu, 23 Dec 2021 07:40:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 25CA16B0073; Thu, 23 Dec 2021 02:40:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1E45E6B0074; Thu, 23 Dec 2021 02:40:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0ABD86B0075; Thu, 23 Dec 2021 02:40:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id F07DB6B0073 for ; Thu, 23 Dec 2021 02:40:04 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id BBBCC886ED for ; Thu, 23 Dec 2021 07:40:04 +0000 (UTC) X-FDA: 78948260328.05.AA50CD1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf30.hostedemail.com (Postfix) with ESMTP id 5D50180023 for ; Thu, 23 Dec 2021 07:40:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=sq6V6vYu5swJCU5ETFM1PG2L8GKOGu+R/KRXeQOTkLk=; b=u3Y/gtLS8RoNxyrxhgE3MioB/K 20hS7ujE5C9IVYYfK+DSjEmBei1DEbxNahFnMGdUrV7yW0h5/NhNiCjD43zjOVehkSvlp1/oyFAk1 HmCKorYobC7gwQDvhKdnbM3G/HqLbV84KpJmBYAzgSEMP2CKmfNUtel3TqewUFKnUIy+eWPuty5Qh MRalUpqsapF1qOf63IfwMmkUc+41VqT7hutw4H07S8jJ/8qvDXiuKLawwhVoq/Yek/P6M1SFO2ZTA 6e3gZQTnW2J1XgpBgxKt7A3uVxW74VWUW6nOmfkH8ffE2zwLjaQPxeQUUvF5Un+Kho6J6/0yJ3pPl zYSblYvw==; Received: from 089144214178.atnat0023.highway.a1.net ([89.144.214.178] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0Ihm-00Bz2T-4F; Thu, 23 Dec 2021 07:40:02 +0000 Date: Thu, 23 Dec 2021 08:39:59 +0100 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" 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: <20211208042256.1923824-26-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b="u3Y/gtLS"; dmarc=none; spf=none (imf30.hostedemail.com: domain of BATV+873f21062ce73a87fae7+6696+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+873f21062ce73a87fae7+6696+infradead.org+hch@bombadil.srs.infradead.org X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 5D50180023 X-Stat-Signature: 7s3hwq45y3orzy9b3g4tho6ybymgbesr X-HE-Tag: 1640245204-381777 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: > thn makes up for the extra 100 bytes of text added to the various s/thn/ > return read_cache_page(mapping, index, NULL, data); > } > > +static inline struct folio *read_mapping_folio(struct address_space *mapping, > + pgoff_t index, void *data) > +{ > + return read_cache_folio(mapping, index, NULL, data); > +} Is there much of a point in this wrapper? > +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.