Index: kernel/generic/src/adt/cht.c
===================================================================
--- kernel/generic/src/adt/cht.c	(revision 0b7bcb8f7fd2c6a7595e9ab91e34305be0df1d6f)
+++ kernel/generic/src/adt/cht.c	(revision 5e5cef3b7bf7f9684a41a5a30a8d2022b309efd7)
@@ -86,4 +86,5 @@
 static size_t size_to_order(size_t bucket_cnt, size_t min_order);
 static cht_buckets_t *alloc_buckets(size_t order, bool set_invalid);
+static inline cht_link_t *find_lazy(cht_t *h, void *key);
 static cht_link_t *search_bucket(cht_t *h, marked_ptr_t head, void *key, 
 	size_t search_hash);
@@ -242,6 +243,10 @@
 }
 
-
 cht_link_t *cht_find_lazy(cht_t *h, void *key)
+{
+	return find_lazy(h, key);
+}
+
+static inline cht_link_t *find_lazy(cht_t *h, void *key)
 {
 	ASSERT(h);
@@ -280,5 +285,5 @@
 }
 
-static cht_link_t *search_bucket(cht_t *h, marked_ptr_t head, void *key, 
+static inline cht_link_t *search_bucket(cht_t *h, marked_ptr_t head, void *key, 
 	size_t search_hash)
 {
@@ -291,12 +296,6 @@
 		 * may find by following the next pointers is allocated.
 		 */
-		size_t cur_hash = node_hash(h, cur);
-
-		if (cur_hash >= search_hash) {
-			if (cur_hash != search_hash)
-				return 0;
-
-			int present = !(N_DELETED & get_mark(cur->link));
-			if (present && h->op->key_equal(key, cur))
+		if (h->op->key_equal(key, cur)) {
+			if (!(N_DELETED & get_mark(cur->link)))
 				return cur;
 		}
@@ -465,5 +464,5 @@
 
 	bool resizing = false;
-	bool inserted;
+	bool inserted = false;
 	
 	do {
@@ -503,6 +502,6 @@
 }
 
-static bool insert_at(cht_link_t *item, const wnd_t *wnd, walk_mode_t walk_mode,
-	bool *resizing)
+inline static bool insert_at(cht_link_t *item, const wnd_t *wnd, 
+	walk_mode_t walk_mode, bool *resizing)
 {
 	marked_ptr_t ret;
@@ -550,5 +549,5 @@
 }
 
-static bool has_duplicates(cht_t *h, const cht_link_t *item, size_t hash, 
+static inline bool has_duplicates(cht_t *h, const cht_link_t *item, size_t hash, 
 	const wnd_t *wnd)
 {
@@ -682,5 +681,5 @@
 
 
-static bool delete_at(cht_t *h, wnd_t *wnd, walk_mode_t walk_mode, 
+static inline bool delete_at(cht_t *h, wnd_t *wnd, walk_mode_t walk_mode, 
 	bool *deleted_but_gc, bool *resizing)
 {
@@ -711,5 +710,6 @@
 }
 
-static bool mark_deleted(cht_link_t *cur, walk_mode_t walk_mode, bool *resizing)
+static inline bool mark_deleted(cht_link_t *cur, walk_mode_t walk_mode, 
+	bool *resizing)
 {
 	ASSERT(cur);
@@ -746,5 +746,6 @@
 }
 
-static bool unlink_from_pred(wnd_t *wnd, walk_mode_t walk_mode, bool *resizing)
+static inline bool unlink_from_pred(wnd_t *wnd, walk_mode_t walk_mode, 
+	bool *resizing)
 {
 	ASSERT(wnd->cur && (N_DELETED & get_mark(wnd->cur->link)));
@@ -1023,5 +1024,6 @@
 #endif
 
-static void help_head_move(marked_ptr_t *psrc_head, marked_ptr_t *pdest_head)
+static inline void help_head_move(marked_ptr_t *psrc_head, 
+	marked_ptr_t *pdest_head)
 {
 	/* Head move has to in progress already when calling this func. */
@@ -1357,5 +1359,5 @@
 }
 
-static void item_removed(cht_t *h)
+static inline void item_removed(cht_t *h)
 {
 	size_t items = (size_t) atomic_predec(&h->item_cnt);
@@ -1374,5 +1376,5 @@
 }
 
-static void item_inserted(cht_t *h)
+static inline void item_inserted(cht_t *h)
 {
 	size_t items = (size_t) atomic_preinc(&h->item_cnt);
@@ -1745,5 +1747,5 @@
 
 
-static size_t calc_split_hash(size_t split_idx, size_t order)
+static inline size_t calc_split_hash(size_t split_idx, size_t order)
 {
 	ASSERT(1 <= order && order <= 8 * sizeof(size_t));
@@ -1751,5 +1753,5 @@
 }
 
-static size_t calc_bucket_idx(size_t hash, size_t order)
+static inline size_t calc_bucket_idx(size_t hash, size_t order)
 {
 	ASSERT(1 <= order && order <= 8 * sizeof(size_t));
@@ -1757,15 +1759,15 @@
 }
 
-static size_t grow_to_split_idx(size_t old_idx)
+static inline size_t grow_to_split_idx(size_t old_idx)
 {
 	return grow_idx(old_idx) | 1;
 }
 
-static size_t grow_idx(size_t idx)
+static inline size_t grow_idx(size_t idx)
 {
 	return idx << 1;
 }
 
-static size_t shrink_idx(size_t idx)
+static inline size_t shrink_idx(size_t idx)
 {
 	return idx >> 1;
@@ -1773,10 +1775,10 @@
 
 
-static size_t key_hash(cht_t *h, void *key)
+static inline size_t key_hash(cht_t *h, void *key)
 {
 	return hash_mix(h->op->key_hash(key));
 }
 
-static size_t node_hash(cht_t *h, const cht_link_t *item)
+static inline size_t node_hash(cht_t *h, const cht_link_t *item)
 {
 	return hash_mix(h->op->hash(item));
@@ -1784,5 +1786,5 @@
 
 
-static marked_ptr_t make_link(const cht_link_t *next, mark_t mark)
+static inline marked_ptr_t make_link(const cht_link_t *next, mark_t mark)
 {
 	marked_ptr_t ptr = (marked_ptr_t) next;
@@ -1795,5 +1797,5 @@
 
 
-static cht_link_t * get_next(marked_ptr_t link)
+static inline cht_link_t * get_next(marked_ptr_t link)
 {
 	return (cht_link_t*)(link & ~N_MARK_MASK);
@@ -1801,5 +1803,5 @@
 
 
-static mark_t get_mark(marked_ptr_t link)
+static inline mark_t get_mark(marked_ptr_t link)
 {
 	return (mark_t)(link & N_MARK_MASK);
@@ -1807,5 +1809,5 @@
 
 
-static void next_wnd(wnd_t *wnd)
+static inline void next_wnd(wnd_t *wnd)
 {
 	ASSERT(wnd);
@@ -1824,5 +1826,5 @@
 }
 
-static marked_ptr_t cas_link(marked_ptr_t *link, const cht_link_t *cur_next, 
+static inline marked_ptr_t cas_link(marked_ptr_t *link, const cht_link_t *cur_next, 
 	mark_t cur_mark, const cht_link_t *new_next, mark_t new_mark)
 {
@@ -1831,5 +1833,5 @@
 }
 
-static marked_ptr_t _cas_link(marked_ptr_t *link, marked_ptr_t cur, 
+static inline marked_ptr_t _cas_link(marked_ptr_t *link, marked_ptr_t cur, 
 	marked_ptr_t new)
 {
@@ -1860,5 +1862,5 @@
 }
 
-static void cas_order_barrier(void)
+static inline void cas_order_barrier(void)
 {
 	/* Make sure CAS to different memory locations are ordered. */
