From dbd810ab678d262d3772d29b65844d7b20dc47bc Mon Sep 17 00:00:00 2001 From: Surbhi Palande Date: Thu, 10 Apr 2014 16:09:51 -0700 Subject: bcache: Fix to remove the rcu_sched stalls. while loop was executing infinitely. This fix ends the while loop gracefully. Signed-off-by: Surbhi Palande Signed-off-by: Kent Overstreet --- drivers/md/bcache/journal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/md/bcache/journal.c') diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index 363b88131f01..ead001c9bed8 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -194,7 +194,8 @@ int bch_journal_read(struct cache_set *c, struct list_head *list) continue; bsearch: /* Binary search */ - m = r = find_next_bit(bitmap, ca->sb.njournal_buckets, l + 1); + m = l; + r = find_next_bit(bitmap, ca->sb.njournal_buckets, l + 1); pr_debug("starting binary search, l %u r %u", l, r); while (l + 1 < r) { -- cgit