bcachefs: Fix bch2_journal_flush_device_pins()
It's now legal for the pin fifo to be empty, which means this code needs to be updated in order to not hit an assert. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
e242b92af5
commit
a2b9a5b272
@ -831,10 +831,12 @@ int bch2_journal_flush_device_pins(struct journal *j, int dev_idx)
|
||||
seq = 0;
|
||||
|
||||
spin_lock(&j->lock);
|
||||
while (!ret && seq < j->pin.back) {
|
||||
while (!ret) {
|
||||
struct bch_replicas_padded replicas;
|
||||
|
||||
seq = max(seq, journal_last_seq(j));
|
||||
if (seq >= j->pin.back)
|
||||
break;
|
||||
bch2_devlist_to_replicas(&replicas.e, BCH_DATA_journal,
|
||||
journal_seq_pin(j, seq)->devs);
|
||||
seq++;
|
||||
|
Loading…
Reference in New Issue
Block a user