Hello Matthew Wilcox (Oracle), The patch 2aadca213a3f: "ufs: add ufs_get_locked_folio and ufs_put_locked_folio" from Oct 16, 2023 (linux-next), leads to the following Smatch static checker warning: fs/ufs/util.c:248 ufs_get_locked_folio() warn: 'folio' is an error pointer or valid fs/ufs/util.c:266 ufs_get_locked_folio() error: 'folio' dereferencing possible ERR_PTR() fs/ufs/util.c 243 struct folio *ufs_get_locked_folio(struct address_space *mapping, 244 pgoff_t index) 245 { 246 struct inode *inode = mapping->host; 247 struct folio *folio = filemap_lock_folio(mapping, index); --> 248 if (!folio) { Should this be if (!IS_ERR(folio)) { 249 folio = read_mapping_folio(mapping, index, NULL); 250 251 if (IS_ERR(folio)) { 252 printk(KERN_ERR "ufs_change_blocknr: read_mapping_folio error: ino %lu, index: %lu\n", 253 mapping->host->i_ino, index); 254 return folio; 255 } 256 257 folio_lock(folio); 258 259 if (unlikely(folio->mapping == NULL)) { 260 /* Truncate got there first */ 261 folio_unlock(folio); 262 folio_put(folio); 263 return NULL; 264 } 265 } 266 if (!folio_buffers(folio)) ^^^^^ 267 create_empty_buffers(folio, 1 << inode->i_blkbits, 0); 268 return folio; 269 } regards, dan carpenter