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 ECA26C433EF for ; Fri, 24 Jun 2022 18:56:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 757068E0269; Fri, 24 Jun 2022 14:56:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 707418E0244; Fri, 24 Jun 2022 14:56:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5F63F8E0269; Fri, 24 Jun 2022 14:56:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 51CAE8E0244 for ; Fri, 24 Jun 2022 14:56:27 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 1F05460AF7 for ; Fri, 24 Jun 2022 18:56:27 +0000 (UTC) X-FDA: 79614035214.22.D300BB3 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf02.hostedemail.com (Postfix) with ESMTP id 8B44A80030 for ; Fri, 24 Jun 2022 18:56:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=IJWx2O/gmqaXm/KHDxJAx7Pdl9sf3SuElrBNoQy/NqY=; b=viKKZmozvsXsG1laaCednKCV4+ +hPw4Kmns2e6bQxXJCk6bJbWgiB3FEs9IeQfsLbJ9s9DYubApl6+GYn080MugUicleTzyKx4Ya5Uk llAqpbMiSNWErYRpFmg7d/OYy/elbElBmlwqu7iJDxaWlHe/pkMTofnnlpxaU6HhNhgdTzkRbR5v/ y3pYu0kX+Nh0jPwnxp3uNGyXmKqilsdBwIkecKYmNaqCaHYsc+I2XE9oIl+9BAO21Nc8MpGk186f3 c5MPlYgy/x3CEtUB/2SIrbyj9XSf7srJvdaXQU5rzXyJigDkMGmVybJPm/NCGYhWzqT3s2QsxoPJJ t8qWP47A==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4oTc-009AGp-TB; Fri, 24 Jun 2022 18:56:21 +0000 Date: Fri, 24 Jun 2022 19:56:20 +0100 From: Matthew Wilcox To: Miaohe Lin Cc: akpm@linux-foundation.org, shy828301@gmail.com, zokeefe@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/16] mm/huge_memory: fix comment of __pud_trans_huge_lock Message-ID: References: <20220622170627.19786-1-linmiaohe@huawei.com> <20220622170627.19786-4-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220622170627.19786-4-linmiaohe@huawei.com> ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=viKKZmoz; dmarc=none; spf=none (imf02.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656096986; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=IJWx2O/gmqaXm/KHDxJAx7Pdl9sf3SuElrBNoQy/NqY=; b=ogSp/y2/8q8nJQWD2gUYoXTJeHyY/x7MIZAytVLoVZYlpqYwxRpt9BvhwJm2fv7Re/CF0W QTjXfXaGjh+AHygcTtRiHZw5CLMmj6kpaVVXVNiTeMTSFt962eE/YW3huzq9/4P9Oh7qd8 y/nOPlGf4rKBqqZ37smpm0Mg87p3q2c= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656096986; a=rsa-sha256; cv=none; b=hJ43+GlzBzfTeCsvQIV+qGxrtnnm/u8T/bZZ5AyUXA9ePxTC6d8lQyy3EFCgDZ4lyZCi7f Wcg80EYu5g65D8HQT5l+tFRuHEc7mttOaEav9tllCwOlS1VJ7UW3hVE8sJ6uNf5FmVwRsH pkmB7xf31pWhJZ9jEsaO8rCr3v8tMNY= X-Stat-Signature: hkudakd1871c9mcfcrfoiqwn7fefd9bd X-Rspamd-Queue-Id: 8B44A80030 X-Rspam-User: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=viKKZmoz; dmarc=none; spf=none (imf02.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam12 X-HE-Tag: 1656096986-90390 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 Thu, Jun 23, 2022 at 01:06:14AM +0800, Miaohe Lin wrote: > __pud_trans_huge_lock returns page table lock pointer if a given pud maps > a thp instead of 'true' since introduced. Fix corresponding comments. I think the comments here are rather wasted. I think this comment should be moved to pud_trans_huge_lock() and turned into kernel-doc format. > Signed-off-by: Miaohe Lin > --- > mm/huge_memory.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 83fb6c3442ff..a26580da8011 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -1903,10 +1903,10 @@ spinlock_t *__pmd_trans_huge_lock(pmd_t *pmd, struct vm_area_struct *vma) > } > > /* > - * Returns true if a given pud maps a thp, false otherwise. > + * Returns page table lock pointer if a given pud maps a thp, NULL otherwise. > * > - * Note that if it returns true, this routine returns without unlocking page > - * table lock. So callers must unlock it. > + * Note that if it returns page table lock pointe, this routine returns without > + * unlocking page table lock. So callers must unlock it. > */ > spinlock_t *__pud_trans_huge_lock(pud_t *pud, struct vm_area_struct *vma) > { > -- > 2.23.0 >