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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA21FC433F5 for ; Fri, 13 May 2022 06:15:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 12B216B0073; Fri, 13 May 2022 02:15:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B5B66B0075; Fri, 13 May 2022 02:15:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E969E6B0078; Fri, 13 May 2022 02:15:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D92A46B0073 for ; Fri, 13 May 2022 02:15:45 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 821CF606E4 for ; Fri, 13 May 2022 06:15:45 +0000 (UTC) X-FDA: 79459708650.26.F57DA32 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf10.hostedemail.com (Postfix) with ESMTP id 03609C008A for ; Fri, 13 May 2022 06:15:18 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Kzyzk39pwzhYsP; Fri, 13 May 2022 14:14:58 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 13 May 2022 14:15:38 +0800 Subject: Re: [PATCH 14/15] mm/swap: fix the comment of get_kernel_pages To: David Hildenbrand , CC: , , , , , , , , , References: <20220509131416.17553-1-linmiaohe@huawei.com> <20220509131416.17553-15-linmiaohe@huawei.com> <3f9e663a-2045-81d1-509e-abbe0e1fa14e@redhat.com> From: Miaohe Lin Message-ID: <639dfeab-d81b-3da1-1da4-52447c8a6b95@huawei.com> Date: Fri, 13 May 2022 14:15:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <3f9e663a-2045-81d1-509e-abbe0e1fa14e@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 03609C008A X-Stat-Signature: ju3a8edy7qado7poqn85cd6ig6tfdbxq Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf10.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspam-User: X-HE-Tag: 1652422518-373161 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: On 2022/5/12 21:45, David Hildenbrand wrote: > On 09.05.22 15:14, Miaohe Lin wrote: >> If no pages were pinned, 0 is returned in fact. Fix the corresponding >> comment. >> >> Signed-off-by: Miaohe Lin >> --- >> mm/swap.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/mm/swap.c b/mm/swap.c >> index 6d2c37f781f8..236b37663a1a 100644 >> --- a/mm/swap.c >> +++ b/mm/swap.c >> @@ -168,8 +168,8 @@ EXPORT_SYMBOL(put_pages_list); >> * >> * Returns number of pages pinned. This may be fewer than the number >> * requested. If nr_pages is 0 or negative, returns 0. If no pages > > Ehm, there is only "nr_segs", no "nr_pages" :/ Want to fix that up in > the same patch? Will do. > >> - * were pinned, returns -errno. Each page returned must be released >> - * with a put_page() call when it is finished with. >> + * were pinned, returns 0. Each page returned must be released with >> + * a put_page() call when it is finished with. >> */ >> int get_kernel_pages(const struct kvec *kiov, int nr_segs, int write, >> struct page **pages) > > Apart from that > > Reviewed-by: David Hildenbrand Many thanks for review and comment! >