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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 28B9BC34022 for ; Mon, 17 Feb 2020 19:15:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D401720836 for ; Mon, 17 Feb 2020 19:15:39 +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="kgYGh8XV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D401720836 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 853496B0088; Mon, 17 Feb 2020 14:15:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 803656B0089; Mon, 17 Feb 2020 14:15:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 719636B008A; Mon, 17 Feb 2020 14:15:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0023.hostedemail.com [216.40.44.23]) by kanga.kvack.org (Postfix) with ESMTP id 5A9C86B0088 for ; Mon, 17 Feb 2020 14:15:39 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 5354C1264 for ; Mon, 17 Feb 2020 19:15:38 +0000 (UTC) X-FDA: 76500573156.05.band84_887ddc5418e52 X-HE-Tag: band84_887ddc5418e52 X-Filterd-Recvd-Size: 3339 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Mon, 17 Feb 2020 19:15:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=TtX4KO46nep3/dtMPTsaoMXZVI5q6MpM39G5vt8u6vs=; b=kgYGh8XV0tmtk1SvQtt5T9mE+L iEDIhgpY9fv8FYxnRE5lKUm/CKMw69PH0iRy/036y/O1hn9EM0Me79CFQVWsn1Hj9XLqb9TazLMoB Nx4Aulf/c8G9KxbxDO6v5QvW73Z1jLAyoUjAA/NlImrTHmswWtpboVcd0agWfeUUhOXgkKbn6FsH6 jReeG0AJ9aUz5vHXMeh2AUU0ZsZDpNgz+UNQEHcvRlCNnfbU+jzskRtuob1OCfFa71cbmy9I9hQs+ eWVqPk7XmQrKJePd3wPdtxGMhnvxR8J1X8LZq3P4nhxkzrZ5te8xo93dDRwREmzFFZBX/4PnkORvk AvwHIyWg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3lPL-00059K-JQ; Mon, 17 Feb 2020 18:46:15 +0000 From: Matthew Wilcox To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, ocfs2-devel@oss.oracle.com, linux-xfs@vger.kernel.org, John Hubbard Subject: [PATCH v6 06/19] mm: rename readahead loop variable to 'i' Date: Mon, 17 Feb 2020 10:45:50 -0800 Message-Id: <20200217184613.19668-10-willy@infradead.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200217184613.19668-1-willy@infradead.org> References: <20200217184613.19668-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: 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(-) 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 =3D 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 =3D i_size_read(inode); gfp_t gfp_mask =3D readahead_gfp_mask(mapping); struct readahead_control rac =3D { @@ -174,7 +174,7 @@ void __do_page_cache_readahead(struct address_space *= mapping, /* * Preallocate as many pages as we will need. */ - for (page_idx =3D 0; page_idx < nr_to_read; page_idx++) { + for (i =3D 0; i < nr_to_read; i++) { struct page *page; =20 if (offset > end_index) @@ -198,7 +198,7 @@ void __do_page_cache_readahead(struct address_space *= mapping, break; page->index =3D offset; list_add(&page->lru, &page_pool); - if (page_idx =3D=3D nr_to_read - lookahead_size) + if (i =3D=3D nr_to_read - lookahead_size) SetPageReadahead(page); rac._nr_pages++; offset++; --=20 2.25.0