[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241001085634.1948384-1-senozhatsky@chromium.org>
Date: Tue, 1 Oct 2024 17:55:56 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Dan Carpenter <dan.carpenter@...aro.org>
Subject: [PATCH] zram: do not skip the first bucket
A small fixup.
Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
Signed-off-by: Sergey Senozhatsky <senozhatsky@...omium.org>
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index d3329a67e805..263795c4aef7 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -264,7 +264,7 @@ static struct zram_pp_slot *select_pp_slot(struct zram_pp_ctl *ctl)
s32 idx = NUM_PP_BUCKETS - 1;
/* The higher the bucket id the more optimal slot post-processing is */
- while (idx > 0) {
+ while (idx >= 0) {
pps = list_first_entry_or_null(&ctl->pp_buckets[idx],
struct zram_pp_slot,
entry);
--
2.46.1.824.gd892dcdcdd-goog
Powered by blists - more mailing lists