From patchwork Mon Jul 20 03:43:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tang Yizhou X-Patchwork-Id: 11672833 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2055A60D for ; Mon, 20 Jul 2020 03:35:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 03D8B20684 for ; Mon, 20 Jul 2020 03:35:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03D8B20684 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2D1376B0003; Sun, 19 Jul 2020 23:35:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 281626B0005; Sun, 19 Jul 2020 23:35:25 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 198D86B0006; Sun, 19 Jul 2020 23:35:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 03A2B6B0003 for ; Sun, 19 Jul 2020 23:35:24 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8647815A9F3 for ; Mon, 20 Jul 2020 03:35:24 +0000 (UTC) X-FDA: 77057038968.29.ear04_500a9b726f21 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 5340A18382295 for ; Mon, 20 Jul 2020 03:35:24 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,tangyizhou@huawei.com,,RULES_HIT:30012:30034:30054,0,RBL:45.249.212.35:@huawei.com:.lbl8.mailshell.net-62.18.2.100 64.95.201.95;04yge9w4j1abojgw55n4p6gfa8dijocebbh6g7uxafkesfrpx1dgwpnznixeuum.6xb9zn5ggqm5qympz4rw4wbmswpif3iooi4wxna6jem1nbw5hoicrmq43nj3riq.e-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: ear04_500a9b726f21 X-Filterd-Recvd-Size: 1787 Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Mon, 20 Jul 2020 03:35:23 +0000 (UTC) Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 30396483EE3751D14E82; Mon, 20 Jul 2020 11:35:07 +0800 (CST) Received: from huawei.com (10.175.100.227) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Mon, 20 Jul 2020 11:35:05 +0800 From: Tang Yizhou To: CC: , , Subject: [PATCH -next] mm/gup.c: Fix the comment of return value for populate_vma_page_range() Date: Mon, 20 Jul 2020 11:43:03 +0800 Message-ID: <20200720034303.29920-1-tangyizhou@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.100.227] X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 5340A18382295 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000070, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The return value of populate_vma_page_range() is consistent with __get_user_pages(), and so is the function comment of return value. Signed-off-by: Tang Yizhou Reviewed-by: Ira Weiny --- mm/gup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/gup.c b/mm/gup.c index 2cc5eba44362..a55f1ec712e9 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1386,7 +1386,8 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm, * * This takes care of mlocking the pages too if VM_LOCKED is set. * - * return 0 on success, negative error code on error. + * Return either number of pages pinned in the vma, or a negative error + * code on error. * * vma->vm_mm->mmap_lock must be held. *