Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lib/lru_cache: fix spelling mistake "colision"->"collision"

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>

authored by

Deshan Zhang and committed by
Andrew Morton
9a42bfd2 fbe617af

+7 -7
+2 -2
include/linux/lru_cache.h
··· 119 119 */ 120 120 121 121 /* this defines an element in a tracked set 122 - * .colision is for hash table lookup. 122 + * .collision is for hash table lookup. 123 123 * When we process a new IO request, we know its sector, thus can deduce the 124 124 * region number (label) easily. To do the label -> object lookup without a 125 125 * full list walk, we use a simple hash table. ··· 145 145 * But it avoids high order page allocations in kmalloc. 146 146 */ 147 147 struct lc_element { 148 - struct hlist_node colision; 148 + struct hlist_node collision; 149 149 struct list_head list; /* LRU list or free list */ 150 150 unsigned refcnt; 151 151 /* back "pointer" into lc_cache->element[index],
+5 -5
lib/lru_cache.c
··· 243 243 244 244 BUG_ON(!lc); 245 245 BUG_ON(!lc->nr_elements); 246 - hlist_for_each_entry(e, lc_hash_slot(lc, enr), colision) { 246 + hlist_for_each_entry(e, lc_hash_slot(lc, enr), collision) { 247 247 /* "about to be changed" elements, pending transaction commit, 248 248 * are hashed by their "new number". "Normal" elements have 249 249 * lc_number == lc_new_number. */ ··· 303 303 BUG_ON(e->refcnt); 304 304 305 305 e->lc_number = e->lc_new_number = LC_FREE; 306 - hlist_del_init(&e->colision); 306 + hlist_del_init(&e->collision); 307 307 list_move(&e->list, &lc->free); 308 308 RETURN(); 309 309 } ··· 324 324 PARANOIA_LC_ELEMENT(lc, e); 325 325 326 326 e->lc_new_number = new_number; 327 - if (!hlist_unhashed(&e->colision)) 328 - __hlist_del(&e->colision); 329 - hlist_add_head(&e->colision, lc_hash_slot(lc, new_number)); 327 + if (!hlist_unhashed(&e->collision)) 328 + __hlist_del(&e->collision); 329 + hlist_add_head(&e->collision, lc_hash_slot(lc, new_number)); 330 330 list_move(&e->list, &lc->to_be_changed); 331 331 332 332 return e;