]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
zsmalloc: don't test shrinker_enabled in zs_shrinker_count()
authorSergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Wed, 21 Oct 2015 22:03:28 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:28 +0000 (09:03 +1100)
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 <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/zsmalloc.c

index c4811067bec7c5420f057e17e585ba15f2602050..fd0593e39bb4dda0e0c6147b47098d74a866ac13 100644 (file)
@@ -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)