unsigned int order,
void **(*object_from)(void *, int))
{
- struct obd_page_pool *page_pool = page_pools[order];
+ struct obd_page_pool *page_pool;
wait_queue_entry_t waitlink;
unsigned long this_idle = -1;
u64 tick_ns = 0;
int p_idx, g_idx;
int i, rc = 0;
- if (!array || count <= 0 || count > page_pool->opp_max_objects)
- return -EINVAL;
-
if (order >= pools_count) {
CDEBUG(D_SEC,
"Requested pool order %d too big, max allocated order %d (chunk size %lu): %d\n",
return -EINVAL;
}
+ if (!array || count <= 0 || count > page_pools[order]->opp_max_objects)
+ return -EINVAL;
+
+ page_pool = page_pools[order];
spin_lock(&page_pool->opp_lock);
page_pool->opp_st_access++;