summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/extents.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-04-11 16:43:11 +0300
committerJens Axboe <axboe@kernel.dk>2021-04-11 17:37:55 +0300
commit11e9560e6c005b4adca12d17b27dc5ac22b40663 (patch)
treea75024b60c72538df1937c50a5d06100155b8fd1 /drivers/md/bcache/extents.c
parent13e1db65d2b9263c3dfe447077981e7a32c857ae (diff)
downloadlinux-11e9560e6c005b4adca12d17b27dc5ac22b40663.tar.xz
bcache: remove PTR_CACHE
Remove the PTR_CACHE inline and replace it with a direct dereference of c->cache. (Coly Li: fix the typo from PTR_BUCKET to PTR_CACHE in commit log) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Coly Li <colyli@suse.de> Link: https://lore.kernel.org/r/20210411134316.80274-3-colyli@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/extents.c')
-rw-r--r--drivers/md/bcache/extents.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/bcache/extents.c b/drivers/md/bcache/extents.c
index f4658a1f37b8..d626ffcbecb9 100644
--- a/drivers/md/bcache/extents.c
+++ b/drivers/md/bcache/extents.c
@@ -50,7 +50,7 @@ static bool __ptr_invalid(struct cache_set *c, const struct bkey *k)
for (i = 0; i < KEY_PTRS(k); i++)
if (ptr_available(c, k, i)) {
- struct cache *ca = PTR_CACHE(c, k, i);
+ struct cache *ca = c->cache;
size_t bucket = PTR_BUCKET_NR(c, k, i);
size_t r = bucket_remainder(c, PTR_OFFSET(k, i));
@@ -71,7 +71,7 @@ static const char *bch_ptr_status(struct cache_set *c, const struct bkey *k)
for (i = 0; i < KEY_PTRS(k); i++)
if (ptr_available(c, k, i)) {
- struct cache *ca = PTR_CACHE(c, k, i);
+ struct cache *ca = c->cache;
size_t bucket = PTR_BUCKET_NR(c, k, i);
size_t r = bucket_remainder(c, PTR_OFFSET(k, i));