linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: David Howells <dhowells@redhat.com>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org
Subject: Re: [bug report] mm: Provide a means of invalidation without using launder_folio
Date: Thu, 13 Jun 2024 18:13:19 +0300	[thread overview]
Message-ID: <d0615dd0-1321-4e32-a71f-e1de2921ca7f@moroto.mountain> (raw)
In-Reply-To: <ZmsIl5y3-RKtlxVZ@casper.infradead.org>

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



  reply	other threads:[~2024-06-13 15:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 13:55 Dan Carpenter
2024-06-13 14:56 ` Matthew Wilcox
2024-06-13 15:13   ` Dan Carpenter [this message]
2024-06-13 15:27     ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d0615dd0-1321-4e32-a71f-e1de2921ca7f@moroto.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox