From: Sergey Senozhatsky Date: Sat, 7 Nov 2015 00:29:32 +0000 (-0800) Subject: zsmalloc: don't test shrinker_enabled in zs_shrinker_count() X-Git-Tag: v4.4-rc1~77^2~72 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=2c35169572b84897b43e6f3e9667fd1904451f34;p=linux-2.6-block.git zsmalloc: don't test shrinker_enabled in zs_shrinker_count() We don't let user to disable shrinker in zsmalloc (once it's been enabled), so no need to check ->shrinker_enabled in zs_shrinker_count(), at the moment at least. Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index c4811067bec7..fd0593e39bb4 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1823,9 +1823,6 @@ static unsigned long zs_shrinker_count(struct shrinker *shrinker, struct zs_pool *pool = container_of(shrinker, struct zs_pool, shrinker); - if (!pool->shrinker_enabled) - return 0; - for (i = zs_size_classes - 1; i >= 0; i--) { class = pool->size_class[i]; if (!class)