elt = uao_find_swhash_elt(aobj, pageidx, slot ? TRUE : FALSE);
struct uao_swhash_elt *elt = uao_find_swhash_elt(aobj, pageidx, slot ? TRUE : FALSE);
uao_set_swslot(uobj, pageidx, slot)	struct uvm_object *uobj;	int pageidx, slot;{	struct uvm_aobj *aobj = (struct uvm_aobj *)uobj;	struct uao_swhash_elt *elt;	int oldslot;	UVMHIST_FUNC("uao_set_swslot"); UVMHIST_CALLED(pdhist);	UVMHIST_LOG(pdhist, "aobj %p pageidx %d slot %d",	    aobj, pageidx, slot, 0);	/*	 * if noswap flag is set, then we can't set a slot	 */	if (aobj->u_flags & UAO_FLAG_NOSWAP) {		if (slot == 0)			return(0);		/* a clear is ok */		/* but a set is not */		printf("uao_set_swslot: uobj = %p\n", uobj);	    panic("uao_set_swslot: attempt to set a slot on a NOSWAP object");	}	/*	 * are we using a hash table?  if so, add it in the hash.	 */	if (UAO_USES_SWHASH(aobj)) {		/*		 * Avoid allocating an entry just to free it again if		 * the page had not swap slot in the first place, and		 * we are freeing.		 */		elt = uao_find_swhash_elt(aobj, pageidx, slot ? TRUE : FALSE);		if (elt == NULL) {			return slot ? -1 : 0;		}		oldslot = UAO_SWHASH_ELT_PAGESLOT(elt, pageidx);		UAO_SWHASH_ELT_PAGESLOT(elt, pageidx) = slot;		/*		 * now adjust the elt's reference counter and free it if we've		 * dropped it to zero.		 */		/* an allocation? */		if (slot) {			if (oldslot == 0)				elt->count++;		} else {			if (oldslot)				elt->count--;			if (elt->count == 0) {				LIST_REMOVE(elt, list);				pool_put(&uao_swhash_elt_pool, elt);			}		}	} else {		/* we are using an array */		oldslot = aobj->u_swslots[pageidx];		aobj->u_swslots[pageidx] = slot;	}	return (oldslot);}