From bf6b0e50bfb3ef5358a76ee7731715200fc3358b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 14 Apr 2020 19:42:33 +0200 Subject: [PATCH] 4.19-stable patches added patches: erofs-correct-the-remaining-shrink-objects.patch --- ...correct-the-remaining-shrink-objects.patch | 35 +++++++++++++++++++ queue-4.19/series | 1 + 2 files changed, 36 insertions(+) create mode 100644 queue-4.19/erofs-correct-the-remaining-shrink-objects.patch diff --git a/queue-4.19/erofs-correct-the-remaining-shrink-objects.patch b/queue-4.19/erofs-correct-the-remaining-shrink-objects.patch new file mode 100644 index 00000000000..7c870de4ff3 --- /dev/null +++ b/queue-4.19/erofs-correct-the-remaining-shrink-objects.patch @@ -0,0 +1,35 @@ +From 9d5a09c6f3b5fb85af20e3a34827b5d27d152b34 Mon Sep 17 00:00:00 2001 +From: Gao Xiang +Date: Wed, 26 Feb 2020 16:10:06 +0800 +Subject: erofs: correct the remaining shrink objects + +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+ +Link: https://lore.kernel.org/r/20200226081008.86348-1-gaoxiang25@huawei.com +Reviewed-by: Chao Yu +Signed-off-by: Gao Xiang +Signed-off-by: Greg Kroah-Hartman + + +--- + drivers/staging/erofs/utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/staging/erofs/utils.c ++++ b/drivers/staging/erofs/utils.c +@@ -309,7 +309,7 @@ unsigned long erofs_shrink_scan(struct s + sbi->shrinker_run_no = run_no; + + #ifdef CONFIG_EROFS_FS_ZIP +- freed += erofs_shrink_workstation(sbi, nr, false); ++ freed += erofs_shrink_workstation(sbi, nr - freed, false); + #endif + + spin_lock(&erofs_sb_list_lock); diff --git a/queue-4.19/series b/queue-4.19/series index 6b75aa546a8..802a24ad044 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -92,3 +92,4 @@ btrfs-drop-block-from-cache-on-error-in-relocation.patch btrfs-fix-missing-file-extent-item-for-hole-after-ranged-fsync.patch btrfs-fix-missing-semaphore-unlock-in-btrfs_sync_file.patch crypto-mxs-dcp-fix-scatterlist-linearization-for-hash.patch +erofs-correct-the-remaining-shrink-objects.patch -- 2.47.3