Re: [bug report] mm: Provide a means of invalidation without using launder_folio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 13, 2024 at 03:56:23PM +0100, Matthew Wilcox wrote:
> On Thu, Jun 13, 2024 at 04:55:30PM +0300, Dan Carpenter wrote:
> > Hello David Howells,
> > 
> > Commit 74e797d79cf1 ("mm: Provide a means of invalidation without
> > using launder_folio") from Mar 27, 2024 (linux-next), leads to the
> > following Smatch static checker warning:
> > 
> > 	mm/filemap.c:4229 filemap_invalidate_inode()
> > 	error: we previously assumed 'mapping' could be null (see line 4200)
> 
> I think David has been overly cautious here.  I don't think i_mapping
> can ever be NULL.  inode_init_always() sets i_mapping to be
> &inode->i_data and I don't see anywhere that changes i_mapping to be
> NULL.
> 

I don't really understand the errors from this function, though...  I
would have expected it to return -EINVAL on this path but it instead
looks up if any error flags as set in the mapping, otherwise it returns
success.

regards,
dan carpenter





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux