diff options
author | Tang Junhui <tang.junhui@zte.com.cn> | 2018-03-18 17:36:21 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-03-18 20:15:20 -0600 |
commit | f3641c3abd1da978ee969b0203b71b86ec1bfa93 (patch) | |
tree | 8670c8088ec6c0f3b1f2fd6b5fb6f0afa3f16872 /drivers/md | |
parent | 688892b3bc05e25da94866e32210e5f503f16f69 (diff) | |
download | linux-f3641c3abd1da978ee969b0203b71b86ec1bfa93.tar.gz linux-f3641c3abd1da978ee969b0203b71b86ec1bfa93.tar.bz2 linux-f3641c3abd1da978ee969b0203b71b86ec1bfa93.zip |
bcache: fix error return value in memory shrink
In bch_mca_scan(), the return value should not be the number of freed btree
nodes, but the number of pages of freed btree nodes.
Signed-off-by: Tang Junhui <tang.junhui@zte.com.cn>
Reviewed-by: Michael Lyle <mlyle@lyle.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/bcache/btree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index 39cc8a549091..b2d4899f48d5 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -719,7 +719,7 @@ static unsigned long bch_mca_scan(struct shrinker *shrink, } out: mutex_unlock(&c->bucket_lock); - return freed; + return freed * c->btree_pages; } static unsigned long bch_mca_count(struct shrinker *shrink, |