From patchwork Thu Apr 16 13:22:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 227586 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88049C2BB85 for ; Thu, 16 Apr 2020 15:40:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59D9B2223D for ; Thu, 16 Apr 2020 15:40:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587051632; bh=Q09ugYHSE2JchczgXLOV6MZ3pdz1U0n2p/LsyMxXRfk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=vdu+atJwzUtDycv4amXOwzznWkHzKvn/+j33ROj37aSp/j1OFaC4ek9eP6nSV3KMR DEYTNRf9bTh6/cTYxkxkjiKCy3GEXxzmbnGKeA2byg+39lDfCoUGatK2EN1tMOCFd9 ccvU07aX8d3pygK0D+eeHu+raViLlHL3lqukjAC8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395425AbgDPPka (ORCPT ); Thu, 16 Apr 2020 11:40:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:50002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2897506AbgDPNhj (ORCPT ); Thu, 16 Apr 2020 09:37:39 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C1FCA221F9; Thu, 16 Apr 2020 13:37:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587044259; bh=Q09ugYHSE2JchczgXLOV6MZ3pdz1U0n2p/LsyMxXRfk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BM4NYk9iOc1bL2BO1j7jM514sFys1XVRa20Hx2hcgnu4ix92ZUGEnCLVLH1mMXvd2 PDeV8Z2oSow3iNUjMVwOCevAoKadRlL/7TB2VSdkD7jZJVh1JmSH/5mtXH9hHFKWic gl3pcwCRbbo8V4mjJ3RPpZ57OqemzilXiagfDolo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Gao Xiang Subject: [PATCH 5.5 118/257] erofs: correct the remaining shrink objects Date: Thu, 16 Apr 2020 15:22:49 +0200 Message-Id: <20200416131341.015978623@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200416131325.891903893@linuxfoundation.org> References: <20200416131325.891903893@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 --- fs/erofs/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/erofs/utils.c +++ b/fs/erofs/utils.c @@ -293,7 +293,7 @@ static unsigned long erofs_shrink_scan(s 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 */