From patchwork Thu Feb 11 16:24:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12083675 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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 6BE12C433E0 for ; Thu, 11 Feb 2021 16:24:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 13F8D64E95 for ; Thu, 11 Feb 2021 16:24:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13F8D64E95 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 74CCF6B011A; Thu, 11 Feb 2021 11:24:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6FAB76B011B; Thu, 11 Feb 2021 11:24:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A26D6B011C; Thu, 11 Feb 2021 11:24:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0244.hostedemail.com [216.40.44.244]) by kanga.kvack.org (Postfix) with ESMTP id 3AB596B011A for ; Thu, 11 Feb 2021 11:24:48 -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 08D4B8249980 for ; Thu, 11 Feb 2021 16:24:48 +0000 (UTC) X-FDA: 77806510656.04.start27_1d0b66f2761a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id E29BD8006983 for ; Thu, 11 Feb 2021 16:24:47 +0000 (UTC) X-HE-Tag: start27_1d0b66f2761a X-Filterd-Recvd-Size: 4272 Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Thu, 11 Feb 2021 16:24:47 +0000 (UTC) Received: by mail-qv1-f42.google.com with SMTP id p6so2797082qvm.12 for ; Thu, 11 Feb 2021 08:24:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=KnIo6b0mEfBi+N6pkBoUNy3tWIMzelUSHiTa3+9/dts=; b=n8Eu1wdTAh9Eu4OjEcbbsCdcAWsoWpPR6r6oYR8mtb7+gOiuwlw5rBoFjWAUF1aD4T TXzqZomyaBngyAVAPOpRH35SWz1FaO7N8eyisU1iXK+yeL/CmG3GjMM0lbDi1VM0RU5Y xl005mxCvoNcjB/gA8lU6/08bS7TVoKdrR9atqFIUZ2MFTaxrnGWK7+GJeJrkaj2eBvn 8DCsb16/e8ik7AkLva5ru4YCK7qz3//jrh0fkfWuQ2cbWV359i9AoN1BOgCZbBmwvJQ9 I2cGyZMZKHROPHbFEIIs6foth/8gNgH54qY6OhsqfuemiSCeodc9J6/bdG1jjwja7/V9 OaKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KnIo6b0mEfBi+N6pkBoUNy3tWIMzelUSHiTa3+9/dts=; b=M0LYqGrkdvVn1DidokUY/P2OQGVWDxKszKCHbsBQadPOFa9SOxlHfEKGCte/CmOyhQ MWri3LoCaPoxD1iziqCWershidloOXt6Yk3IgmTXHWWNRU/aceo1OgKlt8mi4b2Llkha 7KKmOcnkSxzMafWrOwHws4M4gSaOZ+4U9+9Do+En4NqE8gAW16bPBS4uVPI23SRrz4Or X8Cc6CygDwQVkeMz8t65fI/irpDuxYsCbFQOnw5QcZJ9RokZ6pZwFWtQF72As+0FRnqW UhGBxOq45kzkgRIp5OtqX5ui+y6rAV8iKXYkjCsZ2lSEjO0peJMtVLgVg5xf6z6/MURE W5BQ== X-Gm-Message-State: AOAM533Oyjdg/B2K3YhLkhcSU6vdb+2TOv+dwdDjYF/A/NPWjTWlxxi0 +NtJE+01muPPpga7P8cDrAYCiA== X-Google-Smtp-Source: ABdhPJzIeLzlqhbbKblTkU8XD7cXmkgY30iiBxIBBLyWnV0dtEAESq464td/C4isJdlFAK5z34rDsw== X-Received: by 2002:ad4:554c:: with SMTP id v12mr8612729qvy.41.1613060686722; Thu, 11 Feb 2021 08:24:46 -0800 (PST) Received: from localhost.localdomain (c-73-69-118-222.hsd1.nh.comcast.net. [73.69.118.222]) by smtp.gmail.com with ESMTPSA id i23sm3831778qtq.42.2021.02.11.08.24.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 08:24:46 -0800 (PST) From: Pavel Tatashin To: pasha.tatashin@soleen.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz, mhocko@suse.com, david@redhat.com, osalvador@suse.de, dan.j.williams@intel.com, sashal@kernel.org, tyhicks@linux.microsoft.com, iamjoonsoo.kim@lge.com, mike.kravetz@oracle.com, rostedt@goodmis.org, mingo@redhat.com, jgg@ziepe.ca, peterz@infradead.org, mgorman@suse.de, willy@infradead.org, rientjes@google.com, jhubbard@nvidia.com, linux-doc@vger.kernel.org, ira.weiny@intel.com, linux-kselftest@vger.kernel.org, jmorris@namei.org Subject: [PATCH v10 11/14] mm/gup: change index type to long as it counts pages Date: Thu, 11 Feb 2021 11:24:24 -0500 Message-Id: <20210211162427.618913-12-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210211162427.618913-1-pasha.tatashin@soleen.com> References: <20210211162427.618913-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 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: In __get_user_pages_locked() i counts number of pages which should be long, as long is used in all other places to contain number of pages, and 32-bit becomes increasingly small for handling page count proportional values. Signed-off-by: Pavel Tatashin Acked-by: Michal Hocko --- mm/gup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/gup.c b/mm/gup.c index ced2303dc59e..9d303c8e907f 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1471,7 +1471,7 @@ static long __get_user_pages_locked(struct mm_struct *mm, unsigned long start, { struct vm_area_struct *vma; unsigned long vm_flags; - int i; + long i; /* calculate required read or write permissions. * If FOLL_FORCE is set, we only require the "MAY" flags.