kernel/include/linux/rhashtable.h
/* Internal function, do not use. */
Internal function, do not use.
Internal function do not use .
static inline struct rhash_head *__rhashtable_lookup(
	struct rhashtable *ht, const void *key,
	const struct rhashtable_params params)
{
	struct rhashtable_compare_arg arg = {
		.ht = ht,
		.key = key,
	};
	struct bucket_table *tbl;
	struct rhash_head *he;
	unsigned int hash;
	tbl = rht_dereference_rcu(ht->tbl, ht);
restart:
	hash = rht_key_hashfn(ht, tbl, key, params);
	rht_for_each_rcu(he, tbl, hash) {
		if (params.obj_cmpfn ?
		    params.obj_cmpfn(&arg, rht_obj(ht, he)) :
		    rhashtable_compare(&arg, rht_obj(ht, he)))
			continue;
		return he;
	}
	smp_rmb();
	tbl = rht_dereference_rcu(tbl->future_tbl, ht);
	if (unlikely(tbl))
		goto restart;
	return NULL;
}
static inline struct rhash_head * __rhashtable_lookup ( struct rhashtable * ht , const void * key , const struct rhashtable_params params ) { struct rhashtable_compare_arg arg = { . ht = ht , . key = key , } ; struct bucket_table * tbl ; struct rhash_head * he ; unsigned int hash ; tbl = rht_dereference_rcu ( ht -> tbl , ht ) ; restart : hash = rht_key_hashfn ( ht , tbl , key , params ) ; rht_for_each_rcu ( he , tbl , hash ) { if ( params . obj_cmpfn ? params . obj_cmpfn ( & arg , rht_obj ( ht , he ) ) : rhashtable_compare ( & arg , rht_obj ( ht , he ) ) ) continue ; return he ; } smp_rmb ( ) ; tbl = rht_dereference_rcu ( tbl -> future_tbl , ht ) ; if ( unlikely ( tbl ) ) goto restart ; return NULL ; }
Internal function, do not use.
Internal function do not use .
/* Ensure we see any new tables. */