Lines Matching refs:obj
55 struct test_obj *obj; in test_rht_lookup() local
59 obj = rhashtable_lookup_fast(ht, &key, test_rht_params); in test_rht_lookup()
61 if (expected && !obj) { in test_rht_lookup()
64 } else if (!expected && obj) { in test_rht_lookup()
68 } else if (expected && obj) { in test_rht_lookup()
69 if (obj->ptr != TEST_PTR || obj->value != i) { in test_rht_lookup()
71 obj->ptr, TEST_PTR, obj->value, i); in test_rht_lookup()
84 struct test_obj *obj; in test_bucket_stats() local
94 rht_for_each_entry_rcu(obj, pos, tbl, i, node) { in test_bucket_stats()
98 pr_cont(" [%p],", obj); in test_bucket_stats()
101 rht_for_each_entry_rcu(obj, pos, tbl, i, node) in test_bucket_stats()
123 struct test_obj *obj; in test_rhashtable() local
134 struct test_obj *obj; in test_rhashtable() local
136 obj = kzalloc(sizeof(*obj), GFP_KERNEL); in test_rhashtable()
137 if (!obj) { in test_rhashtable()
142 obj->ptr = TEST_PTR; in test_rhashtable()
143 obj->value = i * 2; in test_rhashtable()
145 err = rhashtable_insert_fast(ht, &obj->node, test_rht_params); in test_rhashtable()
147 kfree(obj); in test_rhashtable()
165 obj = rhashtable_lookup_fast(ht, &key, test_rht_params); in test_rhashtable()
166 BUG_ON(!obj); in test_rhashtable()
168 rhashtable_remove_fast(ht, &obj->node, test_rht_params); in test_rhashtable()
169 kfree(obj); in test_rhashtable()
177 rht_for_each_entry_safe(obj, pos, next, tbl, i, node) in test_rhashtable()
178 kfree(obj); in test_rhashtable()