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>
This commit is contained in:
Tang Junhui 2018-03-18 17:36:21 -07:00 committed by Jens Axboe
parent 688892b3bc
commit f3641c3abd

View File

@ -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,