Example #1
0
void rxe_pool_cleanup(struct rxe_pool *pool)
{
	unsigned long flags;

	write_lock_irqsave(&pool->pool_lock, flags);
	pool->state = RXE_POOL_STATE_INVALID;
	if (atomic_read(&pool->num_elem) > 0)
		pr_warn("%s pool destroyed with unfree'd elem\n",
			pool_name(pool));
	write_unlock_irqrestore(&pool->pool_lock, flags);

	rxe_pool_put(pool);
}
Example #2
0
int rxe_pool_cleanup(struct rxe_pool *pool)
{
    unsigned long flags;

    spin_lock_irqsave(&pool->pool_lock, flags);
    pool->state = rxe_pool_invalid;
    if (atomic_read(&pool->num_elem) > 0)
        pr_warn("%s pool destroyed with unfree'd elem\n",
                pool_name(pool));
    spin_unlock_irqrestore(&pool->pool_lock, flags);

    rxe_pool_put(pool);

    return 0;
}