bcachefs: fix ja->cur_idx use while reading journal

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2018-12-18 10:15:35 -05:00 committed by Kent Overstreet
parent d3bb629d04
commit a36d3685bb

View File

@ -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;