From: Wei Yongjun <[email protected]>

Using for_each_clear_bit() to simplify the code.

Signed-off-by: Wei Yongjun <[email protected]>
---
 drivers/md/bcache/journal.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
index 8435f81..c77980d 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -173,9 +173,7 @@ int bch_journal_read(struct cache_set *c, struct list_head 
*list,
                 */
                pr_debug("falling back to linear search");
 
-               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;
 

--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to