From patchwork Tue Jul 11 05:50:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 13308141 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 24AE8EB64DD for ; Tue, 11 Jul 2023 05:50:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B4BC68E0009; Tue, 11 Jul 2023 01:50:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AA76C8E0006; Tue, 11 Jul 2023 01:50:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 837718E0009; Tue, 11 Jul 2023 01:50:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 5BE678E0006 for ; Tue, 11 Jul 2023 01:50:14 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 3BD2CC010C for ; Tue, 11 Jul 2023 05:50:14 +0000 (UTC) X-FDA: 80998255548.02.9F2A5C6 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf07.hostedemail.com (Postfix) with ESMTP id 01FD040009 for ; Tue, 11 Jul 2023 05:50:11 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf07.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 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=1689054612; 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=rtDDWy5lm1vMhjdZV6LLpaDKXMrheUjre6SI2saWdQs=; b=QINFfib0yu96RpGtxim7MAzNJ9obQqWKOB5CkEY4sZu4kZodwzJOG6BXupoFG/zn+m9MhT BHTt7PtGttH1W2uEMuPX1LpTthJFWCISb4Vl++28kUnsEFOP3+ZbkIEZOSDypJuQ7TrxZb qK+pzTIgh8JQya0LLSpE6FADtEM3Zfs= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf07.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689054612; a=rsa-sha256; cv=none; b=T6SY+wvGwEmvpk5RN47Z/MQUiMoDtpJmL/OJPrMo1gdn2m0i5cSnXSUhdqxB7IMkozwKVy EYrqVBRL+/+yeMS0cMMXGMyPx4vbgAcxK3jojy1Osz5XSDd1FRkB0/+tWaWctA7R8NXNGb l1f3k7jfgtKMB3R57gzT5tVAxJxgJ+A= Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4R0VHt1MsqztQvN; Tue, 11 Jul 2023 13:47:06 +0800 (CST) Received: from huawei.com (10.174.151.185) 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.2507.27; Tue, 11 Jul 2023 13:50:03 +0800 From: Miaohe Lin To: , CC: , , Subject: [PATCH v2 6/8] mm: memory-failure: minor cleanup for comments and codestyle Date: Tue, 11 Jul 2023 13:50:14 +0800 Message-ID: <20230711055016.2286677-7-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230711055016.2286677-1-linmiaohe@huawei.com> References: <20230711055016.2286677-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 01FD040009 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: bpkjnegje4i9h6588p4q89ngikt9a5ut X-HE-Tag: 1689054611-313066 X-HE-Meta: U2FsdGVkX1+f740MZVaEpHDB5bbW2i2NPpjpMamNqKZw2+sTEZ0Nl7362j5FNQYW17RrYWjYK1sw6X5m5U1O5qn+RiuiygL8QvRE6MUT5wS/nwjgziLXk2jPfm+bhUDtuK8/eou2CleM4UOmmYZm2AZDb60Z3tBgcln8iXj21mTH4fVmfH46brZu39xL37MAYZcVXEn5Rwct5sBuTi4Qcl/N/R6eevKnx6YoA10EyNkeOY1vGsE1ZrrvHb5CX7KWQ++Amm8l3QQTSWnCFL5Ij5EAu2tL+Se4ZeFKX9bh7sAmybqnKw1ByzYo4zL8uKHc4slx1eISlSCQM/rPXeuhaVqgt8ene8PRRBCoLV0n/unzD20aOFEc84em8y9JNOqK3csThyVigXFu72LneSYLNxlMwvDQpVcGduDgUZ9S8nee1GhX5XXnAH2x8U+P2X3q/++ywz/3LmByANe+j6XrK9mVzvO59cqrR0T1LHvsnIKuKxBx3nRQz6efPkfJ+gljJqYkhFMrq6+gZdVinOUJlGfwCd4FSxiqM6dOK6eAVQAcw61by2mlp0wIti2FB8W2n5u9+r7SY3Za+HP710yh5iBbHZy/tUnIvDJLUp8aWBI2KbnfvBv/Xmlk+Z+MIZQf4HTzeXzH+fLpQmpB4yI7JTwu+gKCq0GF5NRZ/ObLTmCGCOlNFJUORUaGvD3vKAtXJfTtRQLj6xBU0ATosDTJoV2+0IiE/PNclJWurounq4T1MQlZX1xrnSWjem42Zg+DFwt5pCAGgpEW+1xZMjyC6CbS9H8IQVzD6iXkmrbJaHa91j9IrNxxATFwDmarjgP8MVyA+Frq1jz0+SpkBJSiMiqOgZorIxy1x6AB7iJFNfkQFq2v6qnZqlcgYvUTW+39ypNYP3Qqs/FQvJ2HVzb8UjHX51lwnZAXJ+gmqnHcS7OX0kifzhKuV2A9WCPf0YtVKpOBjfYJTHguVWJGgKO 9D5PTyvm HrnSAXzMbruNgNLd5W8jPShPdAj4dQRO9HNX/QPdZX0RWZz9LSrq2ZoH3XZz9xhaNbT1Gpn/MSbWGqmlu+SecdWAqZqbTMMZviXmsUBEjfOtwODEeYnU6JIIWu3CXaRnIDKV9pCM8+lABXfMelUnqZDtuGTkDh9H+bntgHSbK63FBQGE= 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: Fix some wrong function names and grammar error in comments. Also remove unneeded space after for_each_process. No functional change intended. Signed-off-by: Miaohe Lin Acked-by: Naoya Horiguchi --- mm/memory-failure.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 0da6ddbdd718..db4c530944d6 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -608,7 +608,7 @@ static void collect_procs_anon(struct page *page, struct list_head *to_kill, pgoff = page_to_pgoff(page); read_lock(&tasklist_lock); - for_each_process (tsk) { + for_each_process(tsk) { struct anon_vma_chain *vmac; struct task_struct *t = task_early_kill(tsk, force_early); @@ -652,7 +652,7 @@ static void collect_procs_file(struct page *page, struct list_head *to_kill, /* * Send early kill signal to tasks where a vma covers * the page but the corrupted page is not necessarily - * mapped it in its pte. + * mapped in its pte. * Assume applications who requested early kill want * to be informed of all such data corruptions. */ @@ -2127,7 +2127,7 @@ static DEFINE_MUTEX(mf_mutex); * detected by a background scrubber) * * Must run in process context (e.g. a work queue) with interrupts - * enabled and no spinlocks hold. + * enabled and no spinlocks held. * * Return: 0 for successfully handled the memory error, * -EOPNOTSUPP for hwpoison_filter() filtered the error event, @@ -2232,7 +2232,7 @@ int memory_failure(unsigned long pfn, int flags) * otherwise it may race with THP split. * And the flag can't be set in get_hwpoison_page() since * it is called by soft offline too and it is just called - * for !MF_COUNT_INCREASE. So here seems to be the best + * for !MF_COUNT_INCREASED. So here seems to be the best * place. * * Don't need care about the above error handling paths for @@ -2589,10 +2589,10 @@ static bool isolate_page(struct page *page, struct list_head *pagelist) /* * If we succeed to isolate the page, we grabbed another refcount on - * the page, so we can safely drop the one we got from get_any_pages(). + * the page, so we can safely drop the one we got from get_any_page(). * If we failed to isolate the page, it means that we cannot go further * and we will return an error, so drop the reference we got from - * get_any_pages() as well. + * get_any_page() as well. */ put_page(page); return isolated;