diff options
author | Coly Li <colyli@suse.de> | 2020-10-01 14:50:47 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-10-02 14:25:29 -0600 |
commit | 08fdb2cddbdc783fecadfb606868c4498165fc30 (patch) | |
tree | d54bd96c0718badb1252fe6ada94465bb26e729d /drivers/md/bcache/bcache.h | |
parent | 697e23495c94f0380c1ed8b11f830b92b64c99ea (diff) |
bcache: remove for_each_cache()
Since now each cache_set explicitly has single cache, for_each_cache()
is unnecessary. This patch removes this macro, and update all locations
where it is used, and makes sure all code logic still being consistent.
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/bcache.h')
-rw-r--r-- | drivers/md/bcache/bcache.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h index aa112c1adba1..7ffe6b2d179b 100644 --- a/drivers/md/bcache/bcache.h +++ b/drivers/md/bcache/bcache.h @@ -887,9 +887,6 @@ do { \ /* Looping macros */ -#define for_each_cache(ca, cs, iter) \ - for (iter = 0; ca = cs->cache, iter < 1; iter++) - #define for_each_bucket(b, ca) \ for (b = (ca)->buckets + (ca)->sb.first_bucket; \ b < (ca)->buckets + (ca)->sb.nbuckets; b++) @@ -931,11 +928,9 @@ static inline uint8_t bucket_gc_gen(struct bucket *b) static inline void wake_up_allocators(struct cache_set *c) { - struct cache *ca; - unsigned int i; + struct cache *ca = c->cache; - for_each_cache(ca, c, i) - wake_up_process(ca->alloc_thread); + wake_up_process(ca->alloc_thread); } static inline void closure_bio_submit(struct cache_set *c, |