linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gfs2: Use bio_add_folio_nofail()
@ 2025-11-06 20:29 Matthew Wilcox (Oracle)
  2025-11-06 21:23 ` Andreas Gruenbacher
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox (Oracle) @ 2025-11-06 20:29 UTC (permalink / raw)
  To: Andreas Gruenbacher; +Cc: Matthew Wilcox (Oracle), gfs2, linux-fsdevel

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gfs2: Use bio_add_folio_nofail()
  2025-11-06 20:29 [PATCH] gfs2: Use bio_add_folio_nofail() Matthew Wilcox (Oracle)
@ 2025-11-06 21:23 ` Andreas Gruenbacher
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Gruenbacher @ 2025-11-06 21:23 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle); +Cc: gfs2, linux-fsdevel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-06 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-06 20:29 [PATCH] gfs2: Use bio_add_folio_nofail() Matthew Wilcox (Oracle)
2025-11-06 21:23 ` Andreas Gruenbacher

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).