linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] erofs: correct the remaining shrink objects
@ 2020-02-26  2:30 Gao Xiang
  2020-02-26  2:30 ` [PATCH 2/3] erofs: use LZ4_decompress_safe() for full decoding Gao Xiang
  2020-02-26  2:30 ` [PATCH 3/3] erofs: handle corrupted images whose decompressed size less than it'd be Gao Xiang
  0 siblings, 2 replies; 8+ messages in thread
From: Gao Xiang @ 2020-02-26  2:30 UTC (permalink / raw)
  To: Chao Yu, linux-erofs; +Cc: Miao Xie, LKML

The remaining count should not included successful
shrink attempts.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
---
 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 fddc5059c930..df42ea552a44 100644
--- a/fs/erofs/utils.c
+++ b/fs/erofs/utils.c
@@ -286,7 +286,7 @@ static unsigned long erofs_shrink_scan(struct shrinker *shrink,
 		spin_unlock(&erofs_sb_list_lock);
 		sbi->shrinker_run_no = run_no;
 
-		freed += erofs_shrink_workstation(sbi, nr);
+		freed += erofs_shrink_workstation(sbi, nr - freed);
 
 		spin_lock(&erofs_sb_list_lock);
 		/* Get the next list element before we move this one */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-03-03  9:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-26  2:30 [PATCH 1/3] erofs: correct the remaining shrink objects Gao Xiang
2020-02-26  2:30 ` [PATCH 2/3] erofs: use LZ4_decompress_safe() for full decoding Gao Xiang
2020-03-03  9:49   ` Chao Yu
2020-02-26  2:30 ` [PATCH 3/3] erofs: handle corrupted images whose decompressed size less than it'd be Gao Xiang
2020-02-26  2:34   ` Eric Biggers
2020-02-26  2:40     ` Gao Xiang
2020-02-26  2:44       ` Gao Xiang
2020-03-03  9:51   ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).