struct list_head *l, *tmp;
struct ptlrpc_request *req;
- if (!pool)
- return;
+ LASSERT(pool != NULL);
+ spin_lock(&pool->prp_lock);
list_for_each_safe(l, tmp, &pool->prp_req_list) {
req = list_entry(l, struct ptlrpc_request, rq_list);
list_del(&req->rq_list);
OBD_FREE(req->rq_reqbuf, pool->prp_rq_size);
OBD_FREE(req, sizeof(*req));
}
+ spin_unlock(&pool->prp_lock);
OBD_FREE(pool, sizeof(*pool));
}