Hello Kent Overstreet,

This is a semi-automatic email about new static checker warnings.

Commit 76966dbfa9eb ("bcachefs: Improve locking in
__bch2_set_nr_journal_buckets()") from Feb 11, 2023, leads to the
following Smatch complaint:

fs/bcachefs/journal.c:1184 bch2_set_nr_journal_buckets_iter() error: we 
previously assumed 'c' could be null (see line 1153)
fs/bcachefs/journal.c:1187 bch2_set_nr_journal_buckets_iter() warn: variable 
dereferenced before check 'c' (see line 1184)

fs/bcachefs/journal.c
  1183  
  1184          bch2_write_super(c);
                                 ^
Unchecked dereference

  1185  
  1186          /* Commit: */
  1187          if (c)
                    ^
Checked too late

  1188                  spin_lock(&c->journal.lock);
  1189  

regards,
dan carpenter

Reply via email to