Skip to content

Commit 9a42bfd

Browse files
Deshan Zhangakpm00
authored andcommitted
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/[email protected] Signed-off-by: Deshan Zhang <[email protected]> Cc: Christoph Böhmwalder <[email protected]> Cc: Lars Ellenberg <[email protected]> Cc: Philipp Reisner <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent fbe617a commit 9a42bfd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

include/linux/lru_cache.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ write intent log information, three of which are mentioned here.
119119
*/
120120

121121
/* this defines an element in a tracked set
122-
* .colision is for hash table lookup.
122+
* .collision is for hash table lookup.
123123
* When we process a new IO request, we know its sector, thus can deduce the
124124
* region number (label) easily. To do the label -> object lookup without a
125125
* full list walk, we use a simple hash table.
@@ -145,7 +145,7 @@ write intent log information, three of which are mentioned here.
145145
* But it avoids high order page allocations in kmalloc.
146146
*/
147147
struct lc_element {
148-
struct hlist_node colision;
148+
struct hlist_node collision;
149149
struct list_head list; /* LRU list or free list */
150150
unsigned refcnt;
151151
/* back "pointer" into lc_cache->element[index],

lib/lru_cache.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static struct lc_element *__lc_find(struct lru_cache *lc, unsigned int enr,
243243

244244
BUG_ON(!lc);
245245
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) {
247247
/* "about to be changed" elements, pending transaction commit,
248248
* are hashed by their "new number". "Normal" elements have
249249
* lc_number == lc_new_number. */
@@ -303,7 +303,7 @@ void lc_del(struct lru_cache *lc, struct lc_element *e)
303303
BUG_ON(e->refcnt);
304304

305305
e->lc_number = e->lc_new_number = LC_FREE;
306-
hlist_del_init(&e->colision);
306+
hlist_del_init(&e->collision);
307307
list_move(&e->list, &lc->free);
308308
RETURN();
309309
}
@@ -324,9 +324,9 @@ static struct lc_element *lc_prepare_for_change(struct lru_cache *lc, unsigned n
324324
PARANOIA_LC_ELEMENT(lc, e);
325325

326326
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));
330330
list_move(&e->list, &lc->to_be_changed);
331331

332332
return e;

0 commit comments

Comments
 (0)