From nobody Fri Jun 19 06:17:27 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE3CBC433EF for ; Thu, 7 Apr 2022 08:11:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238539AbiDGINV (ORCPT ); Thu, 7 Apr 2022 04:13:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243281AbiDGINB (ORCPT ); Thu, 7 Apr 2022 04:13:01 -0400 Received: from smtpproxy21.qq.com (smtpbg704.qq.com [203.205.195.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A170315A21E for ; Thu, 7 Apr 2022 01:10:15 -0700 (PDT) X-QQ-mid: bizesmtp90t1649319008tjbj1c6q Received: from wuhui-virtual-machine.localdoma ( [202.96.137.248]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 07 Apr 2022 16:10:01 +0800 (CST) X-QQ-SSF: 01400000002000D0O000B00A0000000 X-QQ-FEAT: Y/4E1fKPEOpIgEa3h6QMqPnhlMf2QLngwWYZP79NL9y5k2e1N8mnEzmLfdIyn fYjvnGD3YmowlRKXSJ6yCsYcO3docVgQZkIubJig+7+GZCR39o2Ca4D8yJt/QDRxbCgr7uk RMLNPZGWqyUR+PzqtniOmz+7NxsOuAi+vcFTKj+d1lkstsRtdYydRhG38t2rL3zdwjHVBkX IpzC6fml5CNCDoa+OVLiHpToiHVFeYnyICJXcBu6BTY2iRc9y3Y2FRGeKx7WSw5L7X7Bukv vBJc4M9R5pT/rGmSXnXDVU7NwHRJY7WNd7wtCPle4UTfCFlePVU9CFcLTuc94zUGgoHW1hn 4rzRnFlbxadZ6TcJ3/BNNKHh2kdMA== X-QQ-GoodBg: 2 From: Yixuan Cao To: akpm@linux-foundation.org Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, vbabka@suse.cz, roman.gushchin@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yixuan Cao Subject: [PATCH] mm/slab.c: fix comments Date: Thu, 7 Apr 2022 16:09:58 +0800 Message-Id: <20220407080958.3667-1-caoyixuan2019@email.szu.edu.cn> X-Mailer: git-send-email 2.17.1 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:email.szu.edu.cn:qybgforeign:qybgforeign3 X-QQ-Bgrelay: 1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" While reading the source code, I noticed some language errors in the comments, so I fixed them. Signed-off-by: Yixuan Cao Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> --- mm/slab.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index 90b16c7ae01a..e882657c1494 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -781,7 +781,7 @@ static inline int cache_free_alien(struct kmem_cache *c= achep, void *objp) int slab_node =3D slab_nid(virt_to_slab(objp)); int node =3D numa_mem_id(); /* - * Make sure we are not freeing a object from another node to the array + * Make sure we are not freeing an object from another node to the array * cache on this cpu. */ if (likely(node =3D=3D slab_node)) @@ -832,7 +832,7 @@ static int init_cache_node(struct kmem_cache *cachep, i= nt node, gfp_t gfp) =20 /* * The kmem_cache_nodes don't come and go as CPUs - * come and go. slab_mutex is sufficient + * come and go. slab_mutex provides sufficient * protection here. */ cachep->node[node] =3D n; @@ -845,7 +845,7 @@ static int init_cache_node(struct kmem_cache *cachep, i= nt node, gfp_t gfp) * Allocates and initializes node for a node on each slab cache, used for * either memory or cpu hotplug. If memory is being hot-added, the kmem_c= ache_node * will be allocated off-node since memory is not yet online for the new n= ode. - * When hotplugging memory or a cpu, existing node are not replaced if + * When hotplugging memory or a cpu, existing nodes are not replaced if * already in use. * * Must hold slab_mutex. @@ -1046,7 +1046,7 @@ int slab_prepare_cpu(unsigned int cpu) * offline. * * Even if all the cpus of a node are down, we don't free the - * kmem_cache_node of any cache. This to avoid a race between cpu_down, and + * kmem_cache_node of any cache. This is to avoid a race between cpu_down,= and * a kmalloc allocation from another cpu for memory from the node of * the cpu going down. The kmem_cache_node structure is usually allocated= from * kmem_cache_create() and gets destroyed at kmem_cache_destroy(). @@ -1890,7 +1890,7 @@ static bool set_on_slab_cache(struct kmem_cache *cach= ep, * @flags: SLAB flags * * Returns a ptr to the cache on success, NULL on failure. - * Cannot be called within a int, but can be interrupted. + * Cannot be called within an int, but can be interrupted. * The @ctor is run when new pages are allocated by the cache. * * The flags are @@ -3138,7 +3138,7 @@ static void *fallback_alloc(struct kmem_cache *cache,= gfp_t flags) } =20 /* - * A interface to enable slab creation on nodeid + * An interface to enable slab creation on nodeid */ static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid) --=20 2.17.1