提交 6c4ca1e3 编写于 作者: M Michael Lyle 提交者: Jens Axboe

bcache: check return value of register_shrinker

register_shrinker is now __must_check, so check it to kill a warning.
Caller of bch_btree_cache_alloc in super.c appropriately checks return
value so this is fully plumbed through.

This V2 fixes checkpatch warnings and improves the commit description,
as I was too hasty getting the previous version out.
Signed-off-by: NMichael Lyle <mlyle@lyle.org>
Reviewed-by: NVojtech Pavlik <vojtech@suse.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 e393aa24
......@@ -807,7 +807,10 @@ int bch_btree_cache_alloc(struct cache_set *c)
c->shrink.scan_objects = bch_mca_scan;
c->shrink.seeks = 4;
c->shrink.batch = c->btree_pages * 2;
register_shrinker(&c->shrink);
if (register_shrinker(&c->shrink))
pr_warn("bcache: %s: could not register shrinker",
__func__);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册