diff options
author | Xu Wang <vulab@iscas.ac.cn> | 2020-07-25 14:00:17 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-07-25 15:38:19 +0200 |
commit | ef4eeb855f741586ed120d3f08ed53bb0968244e (patch) | |
tree | 6dba9333833fb03b7c30dfbcddd4897497112c1b /drivers/md/bcache/journal.c | |
parent | bcache: allocate meta data pages as compound pages (diff) | |
download | linux-ef4eeb855f741586ed120d3f08ed53bb0968244e.tar.xz linux-ef4eeb855f741586ed120d3f08ed53bb0968244e.zip |
bcache: journel: use for_each_clear_bit() to simplify the code
Using for_each_clear_bit() to simplify the code.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r-- | drivers/md/bcache/journal.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index d8586b6ccb76..77fbfd52edcf 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -217,10 +217,7 @@ int bch_journal_read(struct cache_set *c, struct list_head *list) */ pr_debug("falling back to linear search\n"); - for (l = find_first_zero_bit(bitmap, ca->sb.njournal_buckets); - l < ca->sb.njournal_buckets; - l = find_next_zero_bit(bitmap, ca->sb.njournal_buckets, - l + 1)) + for_each_clear_bit(l, bitmap, ca->sb.njournal_buckets) if (read_bucket(l)) goto bsearch; |