diff options
author | Coly Li <colyli@suse.de> | 2020-10-01 09:50:49 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-10-02 23:25:30 +0300 |
commit | 4e1ebae3ee4e0ce384c33832f66e417a965b64bc (patch) | |
tree | 18cda8aa30049f1c2a605fd0af84de875224cff0 /drivers/md/bcache/request.c | |
parent | 1132e56e78e3c8f4deaf68ed760c78456a9c61f4 (diff) | |
download | linux-4e1ebae3ee4e0ce384c33832f66e417a965b64bc.tar.xz |
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>
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r-- | drivers/md/bcache/request.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 7f54ae223644..d90319d15b59 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c @@ -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); |