mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
bcache: only use block_bytes() on struct cache
Because struct cache_set and struct cache both have struct cache_sb, therefore macro block_bytes() can be used on both of them. When removing the embedded struct cache_sb from struct cache_set, this macro won't be used on struct cache_set anymore. This patch unifies all block_bytes() usage only on struct cache, this is one of the preparation to remove the embedded struct cache_sb from struct cache_set. Signed-off-by: Coly Li <colyli@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -99,7 +99,7 @@ static int bch_keylist_realloc(struct keylist *l, unsigned int u64s,
|
||||
* bch_data_insert_keys() will insert the keys created so far
|
||||
* and finish the rest when the keylist is empty.
|
||||
*/
|
||||
if (newsize * sizeof(uint64_t) > block_bytes(c) - sizeof(struct jset))
|
||||
if (newsize * sizeof(uint64_t) > block_bytes(c->cache) - sizeof(struct jset))
|
||||
return -ENOMEM;
|
||||
|
||||
return __bch_keylist_realloc(l, u64s);
|
||||
|
||||
Reference in New Issue
Block a user