obj_wasted /= get_maxobj_per_zspage(class->size,
class->pages_per_zspage);
- return obj_wasted * get_pages_per_zspage(class->size);
+ return obj_wasted * class->pages_per_zspage;
}
static void __zs_compact(struct zs_pool *pool, struct size_class *class)
putback_zspage(pool, class, dst_page);
if (putback_zspage(pool, class, src_page) == ZS_EMPTY)
- pool->stats.pages_compacted +=
- get_pages_per_zspage(class->size);
+ pool->stats.pages_compacted += class->pages_per_zspage;
spin_unlock(&class->lock);
cond_resched();
spin_lock(&class->lock);