提交 f3641c3a 编写于 作者: T Tang Junhui 提交者: Jens Axboe

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: NTang Junhui <tang.junhui@zte.com.cn>
Reviewed-by: NMichael Lyle <mlyle@lyle.org>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 688892b3
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册