linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
	Anna Schumaker <anna@kernel.org>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Josef Bacik <josef@toxicpanda.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	syzbot+48011b86c8ea329af1b9@syzkaller.appspotmail.com,
	Christoph Hellwig <hch@lst.de>, David Sterba <dsterba@suse.com>,
	Bob Peterson <rpeterso@redhat.com>,
	Andreas Gruenbacher <agruenba@redhat.com>
Subject: Re: [PATCH] filemap: Handle error return from __filemap_get_folio()
Date: Tue, 9 May 2023 22:49:02 +0200	[thread overview]
Message-ID: <20230509204902.GA2047@lst.de> (raw)
In-Reply-To: <CAHk-=whD=py2eMXFNOEQyDUobAXBJ3O0eFAG6yjC=EN4iZrhKw@mail.gmail.com>

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);
> 
> and in fs/gfs2/lops.c we have a similar case of filemap_get_folio ->
> folio_wait_locked use without checking for any errors.
> 
> I assume it's probably hard to trigger errors in those paths, but it
> does look dodgy.

The pages are pinned at the point.  That being said this code is
absolutely for many other reasons and needs to go away.  I've been
looking into it, but it will probably take several more months to
unpile the onion to get to the hear of the btrfs writeback code
problems..

  reply	other threads:[~2023-05-09 20:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06 16:04 [PATCH] filemap: Handle error return from __filemap_get_folio() Matthew Wilcox (Oracle)
2023-05-06 16:09 ` Linus Torvalds
2023-05-06 16:35   ` Linus Torvalds
2023-05-06 17:04     ` Linus Torvalds
2023-05-06 17:10       ` Linus Torvalds
2023-05-06 17:34         ` Linus Torvalds
2023-05-06 17:41           ` Andrew Morton
2023-05-08 13:56             ` Dan Carpenter
2023-05-09  7:43               ` Dan Carpenter
2023-05-09 17:37                 ` Linus Torvalds
2023-05-09 20:49                   ` Christoph Hellwig [this message]
2023-05-11  9:44                   ` Dan Carpenter
2023-05-09 19:19       ` Johannes Weiner
2023-05-10 20:27         ` Peter Xu
2023-05-10 21:33           ` Linus Torvalds
2023-05-10 21:44             ` Linus Torvalds
2023-05-11  4:45               ` Peter Xu
2023-05-12  0:14                 ` Peter Xu
2023-05-12  3:28                   ` [PATCH 1/3] mm: handle_mm_fault_one() kernel test robot
2023-05-12  3:52                   ` kernel test robot
2023-05-12  3:52                   ` kernel test robot
2023-05-12  4:49                   ` kernel test robot

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=20230509204902.GA2047@lst.de \
    --to=hch@lst.de \
    --cc=agruenba@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=anna@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=dsterba@suse.com \
    --cc=hannes@cmpxchg.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rpeterso@redhat.com \
    --cc=syzbot+48011b86c8ea329af1b9@syzkaller.appspotmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=trond.myklebust@hammerspace.com \
    --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;
as well as URLs for NNTP newsgroup(s).