aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Lyle <mlyle@lyle.org>2017-11-24 18:14:27 -0500
committerJens Axboe <axboe@kernel.dk>2017-11-24 18:23:01 -0500
commit6c4ca1e36cdc1a0a7a84797804b87920ccbebf51 (patch)
tree2eb6d0aadde521db60ab420f412262db6aa01640 /drivers
parente393aa2446150536929140739f09c6ecbcbea7f0 (diff)
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: Michael Lyle <mlyle@lyle.org> Reviewed-by: Vojtech Pavlik <vojtech@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/bcache/btree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 11c5503d31dc..81e8dc3dbe5e 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -807,7 +807,10 @@ int bch_btree_cache_alloc(struct cache_set *c)
807 c->shrink.scan_objects = bch_mca_scan; 807 c->shrink.scan_objects = bch_mca_scan;
808 c->shrink.seeks = 4; 808 c->shrink.seeks = 4;
809 c->shrink.batch = c->btree_pages * 2; 809 c->shrink.batch = c->btree_pages * 2;
810 register_shrinker(&c->shrink); 810
811 if (register_shrinker(&c->shrink))
812 pr_warn("bcache: %s: could not register shrinker",
813 __func__);
811 814
812 return 0; 815 return 0;
813} 816}