elt = pool_get(&uao_swhash_elt_pool, PR_NOWAIT); if (elt == NULL) { return NULL; }
elt = pool_get(&uao_swhash_elt_pool, PR_WAITOK);
static LIST_HEAD(aobjlist, uvm_aobj) uao_list;static struct simplelock uao_list_lock;/* * functions *//* * hash table/array related functions *//* * uao_find_swhash_elt: find (or create) a hash table entry for a page * offset. * * => the object should be locked by the caller */static struct uao_swhash_elt *uao_find_swhash_elt(aobj, pageidx, create)	struct uvm_aobj *aobj;	int pageidx;	boolean_t create;{	struct uao_swhash *swhash;	struct uao_swhash_elt *elt;	voff_t page_tag;	swhash = UAO_SWHASH_HASH(aobj, pageidx);	page_tag = UAO_SWHASH_ELT_TAG(pageidx);	/*	 * now search the bucket for the requested tag	 */	LIST_FOREACH(elt, swhash, list) {		if (elt->tag == page_tag) {			return elt;		}	}	if (!create) {		return NULL;	}	/*	 * allocate a new entry for the bucket and init/insert it in	 */	elt = pool_get(&uao_swhash_elt_pool, PR_NOWAIT);	if (elt == NULL) {		return NULL;	}	LIST_INSERT_HEAD(swhash, elt, list);	elt->tag = page_tag;	elt->count = 0;	memset(elt->slots, 0, sizeof(elt->slots));	return elt;}