Commit d6b52f68 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Fix null ptr deref in journal_pins_to_text()

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 36da8e38
...@@ -1521,6 +1521,11 @@ bool bch2_journal_seq_pins_to_text(struct printbuf *out, struct journal *j, u64 ...@@ -1521,6 +1521,11 @@ bool bch2_journal_seq_pins_to_text(struct printbuf *out, struct journal *j, u64
struct journal_entry_pin *pin; struct journal_entry_pin *pin;
spin_lock(&j->lock); spin_lock(&j->lock);
if (!test_bit(JOURNAL_running, &j->flags)) {
spin_unlock(&j->lock);
return true;
}
*seq = max(*seq, j->pin.front); *seq = max(*seq, j->pin.front);
if (*seq >= j->pin.back) { if (*seq >= j->pin.back) {
......
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