int nr, equal = 0;
int time = 50; /* seconds of sleep if no active namespaces */
- /*
- * No need to setup pool limit for client pools.
- */
- if (client == LDLM_NAMESPACE_SERVER) {
- /*
- * Check all modest namespaces first.
- */
+ /*
+ * No need to setup pool limit for client pools.
+ */
+ if (client == LDLM_NAMESPACE_SERVER) {
+ /*
+ * Check all modest namespaces first.
+ */
mutex_lock(ldlm_namespace_lock(client));
- cfs_list_for_each_entry(ns, ldlm_namespace_list(client),
- ns_list_chain)
- {
- if (ns->ns_appetite != LDLM_NAMESPACE_MODEST)
- continue;
+ list_for_each_entry(ns, ldlm_namespace_list(client),
+ ns_list_chain)
+ {
+ if (ns->ns_appetite != LDLM_NAMESPACE_MODEST)
+ continue;
l = ldlm_pool_granted(&ns->ns_pool);
if (l == 0)
equal = 1;
}
- /*
- * The rest is given to greedy namespaces.
- */
- cfs_list_for_each_entry(ns, ldlm_namespace_list(client),
- ns_list_chain)
- {
- if (!equal && ns->ns_appetite != LDLM_NAMESPACE_GREEDY)
- continue;
+ /*
+ * The rest is given to greedy namespaces.
+ */
+ list_for_each_entry(ns, ldlm_namespace_list(client),
+ ns_list_chain)
+ {
+ if (!equal && ns->ns_appetite != LDLM_NAMESPACE_GREEDY)
+ continue;
if (equal) {
/*
* locks synchronously.
*/
mutex_lock(ldlm_namespace_lock(client));
- if (cfs_list_empty(ldlm_namespace_list(client))) {
+ if (list_empty(ldlm_namespace_list(client))) {
mutex_unlock(ldlm_namespace_lock(client));
break;
}