Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49041888 authored by Shenghui Wang's avatar Shenghui Wang Committed by Greg Kroah-Hartman
Browse files

bcache: use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set



[ Upstream commit 8792099f9ad487cf381f4e8199ff2158ba0f6eb5 ]

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: default avatarShenghui Wang <shhuiw@foxmail.com>
Signed-off-by: default avatarColy Li <colyli@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Stable-dep-of: 80fca8a10b60 ("bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3f1040e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment