]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
zram: drop ->num_active_comps
authorSergey Senozhatsky <senozhatsky@chromium.org>
Wed, 11 Mar 2026 08:42:46 +0000 (17:42 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 5 Apr 2026 20:53:24 +0000 (13:53 -0700)
commit5004a27edba5987bd75fe84c40b1b486ffae8f99
treec455f08005dc0dfc60d71fac9d5cf39b049d99d1
parented19b9d5504f3f7adb68ad8d8db96c390c8570e5
zram: drop ->num_active_comps

It's not entirely correct to use ->num_active_comps for max-prio limit, as
->num_active_comps just tells the number of configured algorithms, not the
max configured priority.  For instance, in the following theoretical
example:

    [lz4] [nil] [nil] [deflate]

->num_active_comps is 2, while the actual max-prio is 3.

Drop ->num_active_comps and use ZRAM_MAX_COMPS instead.

Link: https://lkml.kernel.org/r/20260311084312.1766036-4-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Suggested-by: Minchan Kim <minchan@kernel.org>
Cc: Brian Geffon <bgeffon@google.com>
Cc: gao xu <gaoxu2@honor.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c
drivers/block/zram/zram_drv.h