src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
/*
 * Given a pool, return the next pool in the namespace, or NULL if there is
 * none.  If 'prev' is NULL, return the first pool.
 */
Given a pool, return the next pool in the namespace, or NULL if there is
none.  If 'prev' is NULL, return the first pool.
Given a pool return the next pool in the namespace or NULL if there is none . If ' prev ' is NULL return the first pool .
spa_t *
spa_next(spa_t *prev)
{
	ASSERT(MUTEX_HELD(&spa_namespace_lock));
	if (prev)
		return (AVL_NEXT(&spa_namespace_avl, prev));
	else
		return (avl_first(&spa_namespace_avl));
}
spa_t * spa_next ( spa_t * prev ) { ASSERT ( MUTEX_HELD ( & spa_namespace_lock ) ) ; if ( prev ) return ( AVL_NEXT ( & spa_namespace_avl , prev ) ) ; else return ( avl_first ( & spa_namespace_avl ) ) ; }
Given a pool, return the next pool in the namespace, or NULL if there is
 none.
Given a pool return the next pool in the namespace or NULL if there is none .