From patchwork Tue Aug 30 12:36:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12959269 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 9D9CEECAAD4 for ; Tue, 30 Aug 2022 12:36:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 59A13940007; Tue, 30 Aug 2022 08:36:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5095294000B; Tue, 30 Aug 2022 08:36:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 28898940007; Tue, 30 Aug 2022 08:36:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id ECCBB940007 for ; Tue, 30 Aug 2022 08:36:39 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id D0F9E41318 for ; Tue, 30 Aug 2022 12:36:39 +0000 (UTC) X-FDA: 79856207718.30.91C2F61 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf11.hostedemail.com (Postfix) with ESMTP id 1744340027 for ; Tue, 30 Aug 2022 12:36:38 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MH6CZ3n1Bz1N7J3; Tue, 30 Aug 2022 20:32:58 +0800 (CST) Received: from huawei.com (10.175.124.27) 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; Tue, 30 Aug 2022 20:36:36 +0800 From: Miaohe Lin To: , CC: , , Subject: [PATCH 6/6] mm, hwpoison: cleanup some obsolete comments Date: Tue, 30 Aug 2022 20:36:04 +0800 Message-ID: <20220830123604.25763-7-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220830123604.25763-1-linmiaohe@huawei.com> References: <20220830123604.25763-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661862999; a=rsa-sha256; cv=none; b=IcGOeKoovaYNuHX0BHdscKBZWphTX9VUxtNus3e4GfrGkCjR79NUMIuizWEhUCWOonILWZ N+QGbhNqGt4AstSCSE60NqAH3dzaCXi9nFUBd+XqzKo4MHSCiYV43Y1tzayardN/YlXhYP nGbFKg1y5udkpSTHAI51bghykEEY31Y= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf11.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661862999; 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; bh=4P395rMGd26gHCwgpyjxNFbEx9ZbyATmNKl13s6uNhM=; b=saMvfaITwS80Nw9Etg8997VVzCeVZKmAOh8yuF5MDI7fp3BX16mwISwmuJ8zbZq1XEcQln WM3bnb6Tcw8k73mLvMqAX22vSV9Hsbc/NGvwqxVeq20l0/6fmyVJ25WI1+PqWuJ8V6U1RK uRjTap1ede9t8VNbnSxAAUdvt5kIBDI= X-Stat-Signature: u8wfk9ghufhfs75twwpumh19tg77hcug X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 1744340027 Authentication-Results: imf11.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf11.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspam-User: X-HE-Tag: 1661862998-783493 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: 1.Remove meaningless comment in kill_proc(). That doesn't tell anything. 2.Fix the wrong function name get_hwpoison_unless_zero(). It should be get_page_unless_zero(). 3.The gate keeper for free hwpoison page has moved to check_new_page(). Update the corresponding comment. Signed-off-by: Miaohe Lin Acked-by: Naoya Horiguchi --- mm/memory-failure.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index fb6a10005109..df3bf266eebf 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -277,7 +277,7 @@ static int kill_proc(struct to_kill *tk, unsigned long pfn, int flags) * to SIG_IGN, but hopefully no one will do that? */ ret = send_sig_mceerr(BUS_MCEERR_AO, (void __user *)tk->addr, - addr_lsb, t); /* synchronous? */ + addr_lsb, t); if (ret < 0) pr_info("Error sending signal to %s:%d: %d\n", t->comm, t->pid, ret); @@ -1246,9 +1246,9 @@ static int __get_hwpoison_page(struct page *page, unsigned long flags) return ret; /* - * This check prevents from calling get_hwpoison_unless_zero() - * for any unsupported type of page in order to reduce the risk of - * unexpected races caused by taking a page refcount. + * This check prevents from calling get_page_unless_zero() for any + * unsupported type of page in order to reduce the risk of unexpected + * races caused by taking a page refcount. */ if (!HWPoisonHandlable(head, flags)) return -EBUSY; @@ -2025,7 +2025,7 @@ int memory_failure(unsigned long pfn, int flags) /* * We need/can do nothing about count=0 pages. * 1) it's a free page, and therefore in safe hand: - * prep_new_page() will be the gate keeper. + * check_new_page() will be the gate keeper. * 2) it's part of a non-compound high order page. * Implies some kernel user: cannot stop them from * R/W the page; let's pray that the page has been