Skip to content
Snippets Groups Projects
Commit d52c6af8 authored by Yury Umanets's avatar Yury Umanets
Browse files

b=2262

r=adilger,nathan
- fixed possible divide by zero in ldlm_pools_shrink();
- in ldlm_cancel_lru_local() cancel not more than requested locks in case count is specified (not lru resize case, proc one).
parent 7753baad
No related branches found
No related tags found
No related merge requests found
......@@ -683,7 +683,7 @@ static int ldlm_pools_shrink(ldlm_side_t client, int nr,
total += ldlm_pool_granted(&ns->ns_pool);
mutex_up(ldlm_namespace_lock(client));
if (nr == 0)
if (nr == 0 || total == 0)
return total;
/* Shrink at least ldlm_namespace_nr(client) namespaces. */
......
......@@ -1077,7 +1077,7 @@ int ldlm_cancel_lru_local(struct ldlm_namespace *ns, struct list_head *cancels,
if (slv == 1 || lv < slv)
break;
} else {
if (added > count)
if (added >= count)
break;
}
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment