mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
zram: do not open-code comp priority 0
A cosmetic change: do not open-code compression priority 0, use ZRAM_PRIMARY_COMP instead. Link: https://lkml.kernel.org/r/20241009042908.750260-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
1ced09e033
commit
01a9097aa3
@ -2285,7 +2285,7 @@ static void zram_destroy_comps(struct zram *zram)
|
||||
{
|
||||
u32 prio;
|
||||
|
||||
for (prio = 0; prio < ZRAM_MAX_COMPS; prio++) {
|
||||
for (prio = ZRAM_PRIMARY_COMP; prio < ZRAM_MAX_COMPS; prio++) {
|
||||
struct zcomp *comp = zram->comps[prio];
|
||||
|
||||
zram->comps[prio] = NULL;
|
||||
@ -2357,7 +2357,7 @@ static ssize_t disksize_store(struct device *dev,
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
for (prio = 0; prio < ZRAM_MAX_COMPS; prio++) {
|
||||
for (prio = ZRAM_PRIMARY_COMP; prio < ZRAM_MAX_COMPS; prio++) {
|
||||
if (!zram->comp_algs[prio])
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user