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 02E16C4741F for ; Sun, 1 Nov 2020 11:18:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4F2202084C for ; Sun, 1 Nov 2020 11:18:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="sDUXIFsS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F2202084C 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 CBDE26B006C; Sun, 1 Nov 2020 06:18:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C468F6B0070; Sun, 1 Nov 2020 06:18:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B357C6B0071; Sun, 1 Nov 2020 06:18:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0160.hostedemail.com [216.40.44.160]) by kanga.kvack.org (Postfix) with ESMTP id 806BA6B006C for ; Sun, 1 Nov 2020 06:18:34 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 2AF26180AD802 for ; Sun, 1 Nov 2020 11:18:34 +0000 (UTC) X-FDA: 77435601348.20.worm54_1802567272a6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 00730180C07A3 for ; Sun, 1 Nov 2020 11:18:33 +0000 (UTC) X-HE-Tag: worm54_1802567272a6 X-Filterd-Recvd-Size: 2255 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Sun, 1 Nov 2020 11:18:28 +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=VwiUrGLJh7vpDTgkHnkge31fEnfLKcd4qo1N7sa0DMo=; b=sDUXIFsSh+fz0Ivt6P5r/sVgLh TZOqxS3foFxO7m/WJYmmd+f/5Ibnd4iUWT+8R/gN0VViq7x3j3uuQ+z27srTSa7wTmjxJzoFvp6aS kbUtTJM5nR/3k4WFfpeNapqZUzhSb6cX3t49CBC/NQL3R24EgLBU4r7d5FmxS7E6ocLJvjmnwoe7k 2Mo5oIy12NpYFgoa9Fo+9q0vWZpUBfn88KUlbLhQjoBNrqr2mSN2TbnszEhp62VmplTExRa/anTjj I1Vh67lRoasSkYv0EA2TqUvTKd7BY+x2rs2vLJfynTnkRpZYIKyR6Vbxr/ZtAVSny5ccS1FGxtlF6 FypLJBIg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZBNP-0003n5-0k; Sun, 01 Nov 2020 11:18:23 +0000 Date: Sun, 1 Nov 2020 11:18:22 +0000 From: Matthew Wilcox To: Christoph Hellwig Cc: Andrew Morton , Kent Overstreet , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 07/13] mm: refactor generic_file_buffered_read_get_pages Message-ID: <20201101111822.GW27442@casper.infradead.org> References: <20201031090004.452516-1-hch@lst.de> <20201031090004.452516-8-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201031090004.452516-8-hch@lst.de> 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 Sat, Oct 31, 2020 at 09:59:58AM +0100, Christoph Hellwig wrote: > Move the call to filemap_make_page_uptodate for a newly allocated page > into filemap_new_page, which turns the new vs lookup decision into a > plain if / else statement, rename two identifier to be more obvious > and the function itself to filemap_read_pages which describes > it a little better while being much shorter. We don't need to do this -- filemap_read_page waits for the page to become unlocked, so we already know that it's uptodate (or an error!) and we know it isn't going to have the readahead bit set.