Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp27911pxh; Thu, 7 Apr 2022 12:59:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPDCIryxv2WOnU7GU0mpSy+huljizni43jKOXbuNPKcelfiQsN9q/JZ1CXu5Lx7MSJ3jUK X-Received: by 2002:a17:902:bf06:b0:14d:8c72:96c6 with SMTP id bi6-20020a170902bf0600b0014d8c7296c6mr15368038plb.156.1649361577851; Thu, 07 Apr 2022 12:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649361577; cv=none; d=google.com; s=arc-20160816; b=yiMBeHTotZFrb/JENrA7w4RNzSgiWybVv7tqoJEy/BBIdL3dOkEU4L+1x2PY6Yp9is cEI+DPyl2cOmk5cN6JpJc1S/UxMXgj/sSzQHOgP3mdwUReXW3yBxqSvjlwU8h9/tXfdF vW89Oe69dYzEc0DUUbeucZVR5ehwMxSX2AQe1u/JFO52LobkBZdgqVwnXvuN5fJU2FfX TZGz5veasfihNn0ib2O6xdCBNGIN0Rq+bb5Dlup8NFpWOc6sT/OcB6J2RBrpVmT3wqxn QNrfGkPUvUIkmYpYLnOvZTHY+iwMJXH9RhWyWrO4AwLWmezF66P0NCuBE2snF1SuaN6k gPNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:message-id:date:subject:cc:to:from; bh=MUY+YQcmyqHW0O2WgXSHF+RjMfy91bu5Z1yiYnMpo2Q=; b=ZWRD3h3Zo9tuYvT1jDUZMfQVkLjfsSPqc7K88j8nIrXbDoYiAueU4y4z2GdjgZJOCy 96+DkQHZu9smi7JyzpMEDQ8BHxoZpZmbRUQVvJVrpCaaUJRuA5qmR1rnrWjonFgzPRXo Zad4Jg93+RjroOc0x6MxLAUFlgg38dbxHC7VZ3NXHBQY+3r2I3e60M8SyBSBnkUqTUhx aNxJaBz/yqK/pFrzy3thAgzuRDBQj0IuhYrAlfhNLQiyc6ThmTFB31IwfWh1rj2iU//K lnKMMLbYSpNNhNJuM3Z2/7sALB3wqtqUTnZLHd5FK6Ruh5Gq8/GnQ6qoAmEJl85yC2ki N92w== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=email.szu.edu.cn Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u5-20020a170903124500b00156b4eda6b2si726723plh.287.2022.04.07.12.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 12:59:37 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=email.szu.edu.cn Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6F60F28256C; Thu, 7 Apr 2022 12:25:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233686AbiDGINP (ORCPT + 99 others); Thu, 7 Apr 2022 04:13:15 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While reading the source code, I noticed some language errors in the comments, so I fixed them. Signed-off-by: Yixuan Cao --- 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 *cachep, void *objp) int slab_node = slab_nid(virt_to_slab(objp)); int node = 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 == slab_node)) @@ -832,7 +832,7 @@ static int init_cache_node(struct kmem_cache *cachep, int node, gfp_t gfp) /* * 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] = n; @@ -845,7 +845,7 @@ static int init_cache_node(struct kmem_cache *cachep, int 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_cache_node * will be allocated off-node since memory is not yet online for the new node. - * 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 *cachep, * @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) } /* - * 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) -- 2.17.1