Commit a36d3685 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: fix ja->cur_idx use while reading journal

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent d3bb629d
......@@ -584,7 +584,7 @@ static void bch2_journal_read_device(struct closure *cl)
while (ja->bucket_seq[ja->cur_idx] > min_seq &&
ja->bucket_seq[ja->cur_idx] >
ja->bucket_seq[(ja->cur_idx + 1) % ja->nr])
ja->cur_idx++;
ja->cur_idx = (ja->cur_idx + 1) % ja->nr;
ja->sectors_free = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment