kernel/include/linux/rhashtable.h
/**
 * rhashtable_lookup_insert_key - search and insert object to hash table
 *				  with explicit key
 * @ht:		hash table
 * @key:	key
 * @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.
 *
 * Lookups may occur in parallel with hashtable mutations and resizing.
 *
 * Will trigger an automatic deferred table resizing if the size grows
 * beyond the watermark indicated by grow_decision() which can be passed
 * to rhashtable_init().
 *
 * Returns zero on success.
 */
search and insert object to hash table
with explicit key
@ht:         hash table
@key:        key
@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.

Lookups may occur in parallel with hashtable mutations and resizing.

Will trigger an automatic deferred table resizing if the size grows
beyond the watermark indicated by grow_decision() which can be passed
to rhashtable_init().

Returns zero on success.
search and insert object to hash table with explicit key @ht : hash table @key : key @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 . Lookups may occur in parallel with hashtable mutations and resizing . Will trigger an automatic deferred table resizing if the size grows beyond the watermark indicated by grow_decision () which can be passed to rhashtable_init () . Returns zero on success .
static inline int rhashtable_lookup_insert_key(
	struct rhashtable *ht, const void *key, struct rhash_head *obj,
	const struct rhashtable_params params)
{
	void *ret;
	BUG_ON(!ht->p.obj_hashfn || !key);
	ret = __rhashtable_insert_fast(ht, key, obj, params, false);
	if (IS_ERR(ret))
		return PTR_ERR(ret);
	return ret == NULL ? 0 : -EEXIST;
}
static inline int rhashtable_lookup_insert_key ( struct rhashtable * ht , const void * key , struct rhash_head * obj , const struct rhashtable_params params ) { void * ret ; BUG_ON ( ! ht -> p . obj_hashfn || ! key ) ; ret = __rhashtable_insert_fast ( ht , key , obj , params , false ) ; if ( IS_ERR ( ret ) ) return PTR_ERR ( ret ) ; return ret == NULL ? 0 : - EEXIST ; }
rhashtable_lookup_insert_key - search and insert object to hash table
                                with explicit key
 @ht:         hash table
 @key:        key
 @obj:        pointer to hash head inside object
 @params:     hash table parameters
rhashtable_lookup_insert_key - search and insert object to hash table with explicit key @ht : hash table @key : key @obj : pointer to hash head inside object @params : hash table parameters