Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4357420ybv; Tue, 25 Feb 2020 18:32:13 -0800 (PST) X-Google-Smtp-Source: APXvYqwTDkpsZqofWb0Bc6htO7aqIO5MUQQohvAifdzVMLKkf+aFGbqMcRXAV4xBwA05E6U6Aag8 X-Received: by 2002:a9d:664a:: with SMTP id q10mr1193673otm.298.1582684333005; Tue, 25 Feb 2020 18:32:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582684332; cv=none; d=google.com; s=arc-20160816; b=AADS3x+zUZ9RtV/i/R4JmFbm0kSUynnaHghtzoZRrqpGKzTuBNn769FK7ETo4Yaey7 wrMeMa60J0/8AyXJvpGgHKV1IxRnq39PiviB8r0dKQcxZYqTkxJfo9XmMofaSoh7kr81 jDNLwcPXoidsPRmS/C3Rj+A0b92eEPbvdbLfFjJHlPLkU/yWS00qUiUxO2pbc4+q7eMu u6TQ8KAFpjn1Cqhsuj409MZswP9WIbQpY++admXUcJaEhVFMhmc3tM4eTtYTveDAnazq caWKHDEvxxX6QAol0+UEj6BStIksmxiHbFFdS2bEY2Qf9Fj3gGwYsF2xS0Hn+9TFCcdo h/kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=ICHZ9X5bW3a3+Y+GDXHT5DF2zO7DUBy5QiMiL7fV4ew=; b=zcAhlOhY9M1uIYm8PWoc6ANHw/M6iIy6QGwe5JES1/G9Ef+AOjqTUYVVznkvlBlZPG lQ0NrjQ42y9N3EXc+N8ZaUgO12lLQONaa0BClLQmdVqmAM4A/cyM/6cHwM4dPIANYsOc C1vihBy3UM5LXdnzr0glbEFsI9UZ5K8Rv6lRiu5+QuT6vgKVIEqCmhpegDaKHyp38uU9 fsOEZAWSMP9NSdIWjJ6YEe9RAQzsM8ctq1/cqoHMbs1KcboWJfRKRV3AwxhEcRC2ReG1 YCoCQzo7LrP90q75DPuRu4BbQDY6gQ3lwPLyDk81GIZPmxEc5q6NtwZZ5LVBkLGU47+s at8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10si411183otn.323.2020.02.25.18.32.01; Tue, 25 Feb 2020 18:32:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730172AbgBZCbt (ORCPT + 99 others); Tue, 25 Feb 2020 21:31:49 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:51496 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730014AbgBZCbq (ORCPT ); Tue, 25 Feb 2020 21:31:46 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3598CF3724F2C9AF661F; Wed, 26 Feb 2020 10:31:45 +0800 (CST) Received: from architecture4.huawei.com (10.160.196.180) by smtp.huawei.com (10.3.19.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 26 Feb 2020 10:31:37 +0800 From: Gao Xiang To: Chao Yu , CC: LKML , Miao Xie , "Gao Xiang" Subject: [PATCH 1/3] erofs: correct the remaining shrink objects Date: Wed, 26 Feb 2020 10:30:09 +0800 Message-ID: <20200226023011.103798-1-gaoxiang25@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.160.196.180] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The remaining count should not included successful shrink attempts. Signed-off-by: Gao Xiang --- 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