lib/lru_cache: fix spelling mistake "colision"->"collision"
authorDeshan Zhang <deshan@nfschina.com>
Thu, 25 Jul 2024 09:30:45 +0000 (17:30 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 2 Sep 2024 03:43:29 +0000 (20:43 -0700)
There is a spelling mistake in a literal string and in cariable names.
Fix these.

Link: https://lkml.kernel.org/r/20240725093044.1742842-1-deshan@nfschina.com
Signed-off-by: Deshan Zhang <deshan@nfschina.com>
Cc: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/lru_cache.h
lib/lru_cache.c

index c9afcdd9324cb56645b327125200c4f593dfd5ec..ff82ef85a08467aeb2fcc320ba123efb1f085a7c 100644 (file)
@@ -119,7 +119,7 @@ write intent log information, three of which are mentioned here.
 */
 
 /* this defines an element in a tracked set
- * .colision is for hash table lookup.
+ * .collision is for hash table lookup.
  * When we process a new IO request, we know its sector, thus can deduce the
  * region number (label) easily.  To do the label -> object lookup without a
  * full list walk, we use a simple hash table.
@@ -145,7 +145,7 @@ write intent log information, three of which are mentioned here.
  * But it avoids high order page allocations in kmalloc.
  */
 struct lc_element {
-       struct hlist_node colision;
+       struct hlist_node collision;
        struct list_head list;           /* LRU list or free list */
        unsigned refcnt;
        /* back "pointer" into lc_cache->element[index],
index b3d9187611de13fed10e760d07d5092fa27f91d9..9e0d469c76584e331b064350ef420cdb9e201211 100644 (file)
@@ -243,7 +243,7 @@ static struct lc_element *__lc_find(struct lru_cache *lc, unsigned int enr,
 
        BUG_ON(!lc);
        BUG_ON(!lc->nr_elements);
-       hlist_for_each_entry(e, lc_hash_slot(lc, enr), colision) {
+       hlist_for_each_entry(e, lc_hash_slot(lc, enr), collision) {
                /* "about to be changed" elements, pending transaction commit,
                 * are hashed by their "new number". "Normal" elements have
                 * lc_number == lc_new_number. */
@@ -303,7 +303,7 @@ void lc_del(struct lru_cache *lc, struct lc_element *e)
        BUG_ON(e->refcnt);
 
        e->lc_number = e->lc_new_number = LC_FREE;
-       hlist_del_init(&e->colision);
+       hlist_del_init(&e->collision);
        list_move(&e->list, &lc->free);
        RETURN();
 }
@@ -324,9 +324,9 @@ static struct lc_element *lc_prepare_for_change(struct lru_cache *lc, unsigned n
        PARANOIA_LC_ELEMENT(lc, e);
 
        e->lc_new_number = new_number;
-       if (!hlist_unhashed(&e->colision))
-               __hlist_del(&e->colision);
-       hlist_add_head(&e->colision, lc_hash_slot(lc, new_number));
+       if (!hlist_unhashed(&e->collision))
+               __hlist_del(&e->collision);
+       hlist_add_head(&e->collision, lc_hash_slot(lc, new_number));
        list_move(&e->list, &lc->to_be_changed);
 
        return e;