Commit 19649938 authored by Jan Rybar's avatar Jan Rybar

Merge branch 'fix-99d71ad5' into 'master'

Fix 99d71ad5

My previous patch has a regression. Please merge the fix of regression.

This is based on the following post.
http://www.freelists.org/post/procps/fix-regression-created-by-99d71ad

See merge request !29
parents c41c614b 23ba442c
......@@ -179,7 +179,7 @@ static int parse_slabinfo20(struct slab_info **list, struct slab_stat *stats,
curr->cache_size = (unsigned long)curr->nr_slabs * curr->pages_per_slab * page_size;
if (curr->nr_objs) {
curr->use = 100 * (curr->nr_active_objs / curr->nr_objs);
curr->use = 100 * (float)curr->nr_active_objs / curr->nr_objs;
stats->nr_active_caches++;
} else
curr->use = 0;
......@@ -258,7 +258,7 @@ static int parse_slabinfo11(struct slab_info **list, struct slab_stat *stats,
curr->cache_size = (unsigned long)curr->nr_slabs * curr->pages_per_slab * page_size;
if (curr->nr_objs) {
curr->use = 100 * curr->nr_active_objs / curr->nr_objs;
curr->use = 100 * (float)curr->nr_active_objs / curr->nr_objs;
stats->nr_active_caches++;
} else
curr->use = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment