Commit f3641c3a authored by Tang Junhui's avatar Tang Junhui Committed by 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: default avatarTang Junhui <tang.junhui@zte.com.cn>
Reviewed-by: default avatarMichael Lyle <mlyle@lyle.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment