On Tue, May 09, 2023 at 10:37:12AM -0700, Linus Torvalds wrote: > In fs/btrfs/extent_io.c, we have > > while (index <= end_index) { > folio = filemap_get_folio(mapping, index); > filemap_dirty_folio(mapping, folio); > I have re-worked the Smatch check for warnings about dereferencing error pointer so now it warns about that: fs/btrfs/extent_io.c:224 extent_range_redirty_for_io() error: 'folio' dereferencing possible ERR_PTR() I've also made a list of functions which don't necessarily need to be checked so it's easy to silence false positives now. https://github.com/error27/smatch/blob/master/check_err_ptr_deref.c regards, dan carpenter