]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set
authorShenghui Wang <shhuiw@foxmail.com>
Mon, 8 Oct 2018 12:41:19 +0000 (20:41 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 8 Oct 2018 14:19:56 +0000 (08:19 -0600)
commitf5d447b5a674f4dabf1230539b4d78f254b8d5d0
treede54ce67b92850b3fde8e9704fedad53d5ac9c6c
parent0d157c522eb7c642ba97a76f518622e073e1e800
bcache: use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set

Current cache_set has MAX_CACHES_PER_SET caches most, and the macro
is used for
"
struct cache *cache_by_alloc[MAX_CACHES_PER_SET];
"
in the define of struct cache_set.

Use MAX_CACHES_PER_SET instead of magic number 8 in
__bch_bucket_alloc_set.

Signed-off-by: Shenghui Wang <shhuiw@foxmail.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/alloc.c