Linux-EROFS Archive on
 help / color / Atom feed
From: Gao Xiang via Linux-erofs <>
Cc: Greg Kroah-Hartman <>,, LKML <>
Subject: [PATCH 5.4.y] erofs: correct the remaining shrink objects
Date: Tue, 14 Apr 2020 23:37:00 +0800
Message-ID: <> (raw)
In-Reply-To: <>

From: Gao Xiang <>

commit 9d5a09c6f3b5fb85af20e3a34827b5d27d152b34 upstream.

The remaining count should not include successful
shrink attempts.

Fixes: e7e9a307be9d ("staging: erofs: introduce workstation for decompression")
Cc: <> # 4.19+
Reviewed-by: Chao Yu <>
Signed-off-by: Gao Xiang <>

trivial adaption, build verified.

 fs/erofs/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/erofs/utils.c b/fs/erofs/utils.c
index d92b3e753a6f..3e28fd082df0 100644
--- a/fs/erofs/utils.c
+++ b/fs/erofs/utils.c
@@ -294,7 +294,7 @@ static unsigned long erofs_shrink_scan(struct shrinker *shrink,
 		sbi->shrinker_run_no = run_no;
-		freed += erofs_shrink_workstation(sbi, nr, false);
+		freed += erofs_shrink_workstation(sbi, nr - freed, false);
 		/* Get the next list element before we move this one */

           reply index

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-EROFS Archive on

Archives are clonable:
	git clone --mirror linux-erofs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-erofs linux-erofs/ \
	public-inbox-index linux-erofs

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone