Whamcloud - gitweb
LU-3963 ldlm: convert to linux list api
[fs/lustre-release.git] / lustre / ldlm / ldlm_pool.c
index 522f947..295cf0e 100644 (file)
@@ -1241,19 +1241,19 @@ int ldlm_pools_recalc(ldlm_side_t client)
         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)
@@ -1281,14 +1281,14 @@ int ldlm_pools_recalc(ldlm_side_t client)
                         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) {
                                 /*
@@ -1325,7 +1325,7 @@ int ldlm_pools_recalc(ldlm_side_t client)
                  * 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;
                }