Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6349389ybv; Tue, 18 Feb 2020 15:11:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxyrJOuEXL/P1rsrkh8mYo+Q/fmq+whH2l1hwrBIaNWt8c4PJ3e8XuLV7TsWhSXWM8B11aq X-Received: by 2002:a9d:6c01:: with SMTP id f1mr16953337otq.133.1582067514984; Tue, 18 Feb 2020 15:11:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582067514; cv=none; d=google.com; s=arc-20160816; b=WtYW7dRRxSnm3o7dm8DlyXdxgb1QRtoZvYBvvXlvK5T1zbYnXGFT+N8zrsP51hwO4A 7J4Z8WqTURd0mFBocIcfzYD7Hj2SjRPSqp3ZmsqK1RTLGtTSjxqHlcaEivJe3na65bS1 naerl6sjyaJ2k/1epT06u+KFMHSYLQnh5XLAqyGFcJhzte8HkGrKfPIYEPhinFJUue12 NUKquXBHCNwV2RPLUuLnDOqgayITIGIJyf4zOTZZejdw81orJmJbiIINH+DnWE9IiTiN 59sGWc1fp3Qp901UB0mvBBFEo7iseruhA8JIN+3LYbkXEsBqSQEYkPV1TKb/aSB54sip oyHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Akrlss92FgzkovaQxMkVJdSsymeHgaqEmFb5c836i2c=; b=Cc9BVd62chEPFOjKEw55wNC9o1izF8Srcl2tKdb5tVaqQUz035wCdYw7eF1WaEIyvt 5KObUWiU8KuOcMZ9GC3YqTG58NnvcGIVRbvGxjQOmFuaMwJT9gYAsEfvH0wsHq/XGHgZ BnVeCTZjXgh9JTvzhjPF+8u4H4pJFaJ1K3HRpHBPkIR/mm95CRIoUla3VsHVnDbxBIui V2fkasormUpz2lVEQVOnnN+hvaLXyeymuzQid4Bt6qj1rs9fCOWqXJY7h1aocmCFb/Xx SReiNQmfDacf19co2hNtg5vx6spRPTgsREAxXCbq4bK9Kb9RmeIdct+p8FIcZWqG/Fhu /uIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=asIzv0oj; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si152996otq.68.2020.02.18.15.11.44; Tue, 18 Feb 2020 15:11:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=asIzv0oj; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727584AbgBRXLk (ORCPT + 99 others); Tue, 18 Feb 2020 18:11:40 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:6598 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726820AbgBRXLj (ORCPT ); Tue, 18 Feb 2020 18:11:39 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 18 Feb 2020 15:11:25 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 18 Feb 2020 15:11:39 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 18 Feb 2020 15:11:39 -0800 Received: from [10.110.48.28] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 18 Feb 2020 23:11:38 +0000 Subject: Re: [PATCH v6 06/19] mm: rename readahead loop variable to 'i' To: Matthew Wilcox , CC: , , , , , , , , References: <20200217184613.19668-1-willy@infradead.org> <20200217184613.19668-10-willy@infradead.org> X-Nvconfidentiality: public From: John Hubbard Message-ID: <64b98d0d-d281-fe34-8dbb-a04ac719d74d@nvidia.com> Date: Tue, 18 Feb 2020 15:11:38 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200217184613.19668-10-willy@infradead.org> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1582067485; bh=Akrlss92FgzkovaQxMkVJdSsymeHgaqEmFb5c836i2c=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=asIzv0ojJMKF80DvWYkbSq9xGWJ7ZLdUAYVyRhXJBGnn4nPGzSL5rIS/ovTNr0scc gs7mPgZCbIGuN21UlJlaqg82EidFL/bBRrnN1h9FnqQChjvgbS/geskVhNeO2W1sV/ biiNK98/SqvU14elddMK8D4ixbdxkqTNwCfXZWhbo6lz6fqouGkCodOHr15m9WoBPg I43na5oYhdKOUUcTc0axj14qTc0xmCQmt8qsSWiZWW3MAxOJzAv21qXLCylvpn+L1Q UamfH/UvbmkELot1FHszYWOU7zMxTj/3Gq6drvkO89R/67fyfce8YR2j0Jl0ROIySV t1Mvpfops1WHQ== Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Change the type of page_idx to unsigned long, and rename it -- it's > just a loop counter, not a page index. > > Suggested-by: John Hubbard > Signed-off-by: Matthew Wilcox (Oracle) > --- > mm/readahead.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > Looks good, Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA > diff --git a/mm/readahead.c b/mm/readahead.c > index 74791b96013f..bdc5759000d3 100644 > --- a/mm/readahead.c > +++ b/mm/readahead.c > @@ -156,7 +156,7 @@ void __do_page_cache_readahead(struct address_space *mapping, > struct inode *inode = mapping->host; > unsigned long end_index; /* The last page we want to read */ > LIST_HEAD(page_pool); > - int page_idx; > + unsigned long i; > loff_t isize = i_size_read(inode); > gfp_t gfp_mask = readahead_gfp_mask(mapping); > struct readahead_control rac = { > @@ -174,7 +174,7 @@ void __do_page_cache_readahead(struct address_space *mapping, > /* > * Preallocate as many pages as we will need. > */ > - for (page_idx = 0; page_idx < nr_to_read; page_idx++) { > + for (i = 0; i < nr_to_read; i++) { > struct page *page; > > if (offset > end_index) > @@ -198,7 +198,7 @@ void __do_page_cache_readahead(struct address_space *mapping, > break; > page->index = offset; > list_add(&page->lru, &page_pool); > - if (page_idx == nr_to_read - lookahead_size) > + if (i == nr_to_read - lookahead_size) > SetPageReadahead(page); > rac._nr_pages++; > offset++; >