linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruenba@redhat.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: gfs2@lists.linux.dev, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] gfs2: Use bio_add_folio_nofail()
Date: Thu, 6 Nov 2025 22:23:03 +0100	[thread overview]
Message-ID: <CAHc6FU40AYoMDTxRwWuT8XtfWozsfwEzOqPoVQD1giPVT2GMkQ@mail.gmail.com> (raw)
In-Reply-To: <20251106202944.2344526-1-willy@infradead.org>

On Thu, Nov 6, 2025 at 9:29 PM Matthew Wilcox (Oracle)
<willy@infradead.org> wrote:
> As the label says, we've just allocated a new BIO so we know
> we can add this folio to it.  We now have bio_add_folio_nofail()
> for this purpose.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
>  fs/gfs2/lops.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
> index 9c8c305a75c4..233b3aa8edca 100644
> --- a/fs/gfs2/lops.c
> +++ b/fs/gfs2/lops.c
> @@ -562,8 +562,7 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
>                         bio = gfs2_log_alloc_bio(sdp, dblock, gfs2_end_log_read);
>                         bio->bi_opf = REQ_OP_READ;
>  add_block_to_new_bio:
> -                       if (!bio_add_folio(bio, folio, bsize, off))
> -                               BUG();
> +                       bio_add_folio_nofail(bio, folio, bsize, off);
>  block_added:
>                         off += bsize;
>                         if (off == folio_size(folio))
> --
> 2.47.2
>

Added, thanks.

Andreas


      reply	other threads:[~2025-11-06 21:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06 20:29 [PATCH] gfs2: Use bio_add_folio_nofail() Matthew Wilcox (Oracle)
2025-11-06 21:23 ` Andreas Gruenbacher [this message]

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=CAHc6FU40AYoMDTxRwWuT8XtfWozsfwEzOqPoVQD1giPVT2GMkQ@mail.gmail.com \
    --to=agruenba@redhat.com \
    --cc=gfs2@lists.linux.dev \
    --cc=linux-fsdevel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).