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=-7.0 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,URIBL_DBL_ABUSE_MALW,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 B8F33C3524A for ; Sat, 1 Feb 2020 15:12:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7916C2465A for ; Sat, 1 Feb 2020 15:12:53 +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="EsWLez9k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7916C2465A 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 BB9C36B05FF; Sat, 1 Feb 2020 10:12:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B13646B0603; Sat, 1 Feb 2020 10:12:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9AF976B0601; Sat, 1 Feb 2020 10:12:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0181.hostedemail.com [216.40.44.181]) by kanga.kvack.org (Postfix) with ESMTP id 83F406B05FF for ; Sat, 1 Feb 2020 10:12:46 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3E4AB8248047 for ; Sat, 1 Feb 2020 15:12:46 +0000 (UTC) X-FDA: 76441900332.04.lamp61_8c91e332f9160 X-HE-Tag: lamp61_8c91e332f9160 X-Filterd-Recvd-Size: 3769 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Sat, 1 Feb 2020 15:12:45 +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:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7T6itBiApRciaky4TlalX8Xey/dXpsbhmN7GfbwBCQQ=; b=EsWLez9kTGd6EaoT9SAbd2LujH fmHq7OV1St1lovoCDhgD7eVFl1qY1QPAkRPH+0+6/eLviLQI9K115SysliSx+2JmgxuYVfWirMK5v q6gthZlrowrCEYkfyaaOTTq4yFGGQ2aDZuv2SLhb1CKh5SZVG5gj/zJqyTlUAdQPo+Y/3GvS6g3M/ 08Xth5WAAiF7zzjzCohSq6IaHrxffG92XKzowTCFaoj1QxrRyCQUO0Pu6eBeys9UZjbdebia9wVi7 /3D3m0mo+NHYkitIDnpR/K68huWv76tD5+XSl8lzy1RN4ONqA4m/JigpdHDksQHPaSAKPCusJ4ol8 IWO6ApeQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixuRu-0006HH-2G; Sat, 01 Feb 2020 15:12:42 +0000 From: Matthew Wilcox To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 01/12] mm: Fix the return type of __do_page_cache_readahead Date: Sat, 1 Feb 2020 07:12:29 -0800 Message-Id: <20200201151240.24082-2-willy@infradead.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200201151240.24082-1-willy@infradead.org> References: <20200201151240.24082-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)" ra_submit() which is a wrapper around __do_page_cache_readahead() already returns an unsigned long, and the 'nr_to_read' parameter is an unsigned long, so fix __do_page_cache_readahead() to return an unsigned long, even though I'm pretty sure we're not going to readahead more than 2^32 pages ever. Signed-off-by: Matthew Wilcox (Oracle) --- mm/internal.h | 2 +- mm/readahead.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index 3cf20ab3ca01..41b93c4b3ab7 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -49,7 +49,7 @@ void unmap_page_range(struct mmu_gather *tlb, unsigned long addr, unsigned long end, struct zap_details *details); =20 -extern unsigned int __do_page_cache_readahead(struct address_space *mapp= ing, +extern unsigned long __do_page_cache_readahead(struct address_space *map= ping, struct file *filp, pgoff_t offset, unsigned long nr_to_read, unsigned long lookahead_size); =20 diff --git a/mm/readahead.c b/mm/readahead.c index 2fe72cd29b47..6bf73ef33b7e 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -152,7 +152,7 @@ static int read_pages(struct address_space *mapping, = struct file *filp, * * Returns the number of pages requested, or the maximum amount of I/O a= llowed. */ -unsigned int __do_page_cache_readahead(struct address_space *mapping, +unsigned long __do_page_cache_readahead(struct address_space *mapping, struct file *filp, pgoff_t offset, unsigned long nr_to_read, unsigned long lookahead_size) { @@ -161,7 +161,7 @@ unsigned int __do_page_cache_readahead(struct address= _space *mapping, unsigned long end_index; /* The last page we want to read */ LIST_HEAD(page_pool); int page_idx; - unsigned int nr_pages =3D 0; + unsigned long nr_pages =3D 0; loff_t isize =3D i_size_read(inode); gfp_t gfp_mask =3D readahead_gfp_mask(mapping); =20 --=20 2.24.1