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 3F666C02194 for ; Fri, 7 Feb 2025 02:46:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 49C296B007B; Thu, 6 Feb 2025 21:46:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44BA66B0082; Thu, 6 Feb 2025 21:46:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 313A46B0083; Thu, 6 Feb 2025 21:46:41 -0500 (EST) 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 13C376B007B for ; Thu, 6 Feb 2025 21:46:41 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 85E9CA1350 for ; Fri, 7 Feb 2025 02:46:40 +0000 (UTC) X-FDA: 83091610560.13.9AEA155 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf24.hostedemail.com (Postfix) with ESMTP id 8BBAC18000D for ; Fri, 7 Feb 2025 02:46:38 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QoAmx+EC; spf=pass (imf24.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738896398; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=XshCRkcmNwuT/euYxqOTUA+A6AWBxcJxcyOmEZR6oEo=; b=fom0Cm02xo2HUiMP9v3wYXucgRskrW/0FRSB5lDFbZHlcElrRWFYEXC3mORs33D2dGypK+ hmdPQPZ21S+fPUS0qoZZBKGYXHpl5eZs2cbip/vvwShca3ENc9DFGJVxnON11qEMDpeTNp SYGhNFe/F59xs8VxxCj0EAcIOawZots= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738896398; a=rsa-sha256; cv=none; b=0sGR/wJ35TxXiCxRFU0HZMDw+Ignh7Xu/UGBvj0Q+EU9orG60wTmxUeVPXfd/VORTUrsz1 IXAY8FL6jKKqCDNzhgwskKL6NtGQ37drQQ6yfMLa0RadoPbWdkdC+zYAG3qomxOJboYCkY FApRUADzInzVC0NcgSFWqXZI7c5fl2o= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QoAmx+EC; spf=pass (imf24.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738896397; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XshCRkcmNwuT/euYxqOTUA+A6AWBxcJxcyOmEZR6oEo=; b=QoAmx+EC8DQZNZQPNaFLLFfwVDxcRY2sdqaWs6vVDpkAMDCjq+lVKbluRCLY18qVokITyx OdEkiP9FiNi5X+PgkTzBZK5eMC9HMq+i3I2+ZUGAbtBNE8JHv8lFDRsvwDjlBMmJ7iuYIb 4l7685iA2zpNnrgxvcblJw5TOCDMVWg= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-608-lBuVdnwAM5KLvc1qTpQu6A-1; Thu, 06 Feb 2025 21:46:32 -0500 X-MC-Unique: lBuVdnwAM5KLvc1qTpQu6A-1 X-Mimecast-MFC-AGG-ID: lBuVdnwAM5KLvc1qTpQu6A Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B9EC81800879; Fri, 7 Feb 2025 02:46:30 +0000 (UTC) Received: from localhost (unknown [10.72.112.206]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6015419560AE; Fri, 7 Feb 2025 02:46:28 +0000 (UTC) Date: Fri, 7 Feb 2025 10:46:24 +0800 From: Baoquan He To: Kairui Song Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, chrisl@kernel.org Subject: Re: [PATCH 06/12] mm/swapfile.c: update the code comment above swap_count_continued() Message-ID: References: <20250205092721.9395-1-bhe@redhat.com> <20250205092721.9395-7-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Rspam-User: X-Rspamd-Queue-Id: 8BBAC18000D X-Rspamd-Server: rspam07 X-Stat-Signature: irqyjgm99pn1bwnrfzi1eohd86i8df1c X-HE-Tag: 1738896398-187253 X-HE-Meta: U2FsdGVkX1/WJOfUmt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tF20gVAi623AqPOaHgsB/+x+RTfaRHdxLhhHe7gWrZIcbC15o20jA0C6Dudrd2nmJY4lZhan8zMr8jSBQMUp5ol4WgC9csiYpeM5EIf3Y51IZfVszKq891HwzImUaCD7r9rVvoU53dXiDZqNkv1JC/lr3xUD+4hcfHpSTcPAPZag9F81L3olOHU60ZBtSiipbn3tvLF5PSFud49YmMRyOz0t81XKrW5mY+hSqcoIRejd3nwr0gryKIYj5myOVCzYzUUYK5p2QGqZ67UVuIg2OlFwFLOM8/EmbrtnxhzbOCvPwTK4SdkDFNimj5Mgft 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: List-Subscribe: List-Unsubscribe: On 02/06/25 at 03:50pm, Kairui Song wrote: > On Wed, Feb 5, 2025 at 5:28 PM Baoquan He wrote: > > > > Now, swap_count_continued() has two callers, __swap_duplicate() and > > __swap_entry_free_locked(), the relevant code comment is stale. > > Update it to reflect the current situation. > > > > Signed-off-by: Baoquan He > > --- > > mm/swapfile.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/mm/swapfile.c b/mm/swapfile.c > > index bf284ba16198..9ee2238042a5 100644 > > --- a/mm/swapfile.c > > +++ b/mm/swapfile.c > > @@ -3789,8 +3789,8 @@ int add_swap_count_continuation(swp_entry_t entry, gfp_t gfp_mask) > > * into, carry if so, or else fail until a new continuation page is allocated; > > * when the original swap_map count is decremented from 0 with continuation, > > * borrow from the continuation and report whether it still holds more. > > - * Called while __swap_duplicate() or swap_entry_free() holds swap or cluster > > - * lock. > > + * Called while __swap_duplicate() or caller of __swap_entry_free_locked() > > + * holds swap or cluster lock. > > It should be only "cluster lock" not "swap or cluster lock" now? You are right, I will update. > > > */ > > static bool swap_count_continued(struct swap_info_struct *si, > > pgoff_t offset, unsigned char count) > > -- > > 2.41.0 > > >