/* Because sparse isn't smart enough to know about conditional lock return status, we need to help it get it right by annotating the path that does not release the lock.  */
void* xfs_mru_cache_lookup(xfs_mru_cache_t *mru, unsigned long key)
/* Because sparse isn't smart enough to know about conditional lock return status, we need to help it get it right by annotating the path that does not release the lock.  */
void* xfs_mru_cache_lookup(xfs_mru_cache_t *mru, unsigned long key)
{
	xfs_mru_cache_elem_t *elem;
	ASSERT(mru && mru->lists);
	if (!mru || !mru->lists)
		return NULL;
	spin_lock(&mru->lock);
	elem = radix_tree_lookup(&mru->store, key);
	if (elem) {
		list_del(&elem->list_node);
		_xfs_mru_cache_list_insert(mru, elem);
		__release(mru_lock);
	} else
		spin_unlock(&mru->lock);
	return elem ? elem->value : NULL;
}