mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-01 01:03:52 +00:00
bcachefs: Fix null ptr deref in journal_pins_to_text()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
36da8e387b
commit
d6b52f6828
1 changed files with 5 additions and 0 deletions
|
|
@ -1521,6 +1521,11 @@ bool bch2_journal_seq_pins_to_text(struct printbuf *out, struct journal *j, u64
|
|||
struct journal_entry_pin *pin;
|
||||
|
||||
spin_lock(&j->lock);
|
||||
if (!test_bit(JOURNAL_running, &j->flags)) {
|
||||
spin_unlock(&j->lock);
|
||||
return true;
|
||||
}
|
||||
|
||||
*seq = max(*seq, j->pin.front);
|
||||
|
||||
if (*seq >= j->pin.back) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue