linux/include/linux/rhashtable.h
/**
 * rhashtable_lookup_insert_fast - lookup and insert object into hash table
 * @ht:		hash table
 * @obj:	pointer to hash head inside object
 * @params:	hash table parameters
 *
 * Locks down the bucket chain in both the old and new table if a resize
 * is in progress to ensure that writers can't remove from the old table
 * and can't insert to the new table during the atomic operation of search
 * and insertion. Searches for duplicates in both the old and new table if
 * a resize is in progress.
 *
 * This lookup function may only be used for fixed key hash table (key_len
 * parameter set). It will BUG() if used inappropriately.
 *
 * It is safe to call this function from atomic context.
 *
 * Will trigger an automatic deferred table resizing if residency in the
 * table grows beyond 70%.
 */
lookup and insert object into hash table
@ht:         hash table
@obj:        pointer to hash head inside object
@params:     hash table parameters

Locks down the bucket chain in both the old and new table if a resize
is in progress to ensure that writers can't remove from the old table
and can't insert to the new table during the atomic operation of search
and insertion. Searches for duplicates in both the old and new table if
a resize is in progress.

This lookup function may only be used for fixed key hash table (key_len
parameter set). It will BUG() if used inappropriately.

It is safe to call this function from atomic context.

Will trigger an automatic deferred table resizing if residency in the
table grows beyond 70%.
lookup and insert object into hash table @ht : hash table @obj : pointer to hash head inside object @params : hash table parameters Locks down the bucket chain in both the old and new table if a resize is in progress to ensure that writers can ' t remove from the old table and can ' t insert to the new table during the atomic operation of search and insertion . Searches for duplicates in both the old and new table if a resize is in progress . This lookup function may only be used for fixed key hash table ( key_len parameter set ) . It will BUG () if used inappropriately . It is safe to call this function from atomic context . Will trigger an automatic deferred table resizing if residency in the table grows beyond 70% .
static inline int rhashtable_lookup_insert_fast(
	struct rhashtable *ht, struct rhash_head *obj,
	const struct rhashtable_params params)
{
	const char *key = rht_obj(ht, obj);
	void *ret;
	BUG_ON(ht->p.obj_hashfn);
	ret = __rhashtable_insert_fast(ht, key + ht->p.key_offset, obj, params,
				       false);
	if (IS_ERR(ret))
		return PTR_ERR(ret);
	return ret == NULL ? 0 : -EEXIST;
}
static inline int rhashtable_lookup_insert_fast ( struct rhashtable * ht , struct rhash_head * obj , const struct rhashtable_params params ) { const char * key = rht_obj ( ht , obj ) ; void * ret ; BUG_ON ( ht -> p . obj_hashfn ) ; ret = __rhashtable_insert_fast ( ht , key + ht -> p . key_offset , obj , params , false ) ; if ( IS_ERR ( ret ) ) return PTR_ERR ( ret ) ; return ret == NULL ? 0 : - EEXIST ; }
rhashtable_lookup_insert_fast - lookup and insert object into hash table
 @ht:         hash table
 @obj:        pointer to hash head inside object
 @params:     hash table parameters
rhashtable_lookup_insert_fast - lookup and insert object into hash table @ht : hash table @obj : pointer to hash head inside object @params : hash table parameters