]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gfs2: Remove use of b_end_io in gfs2_meta_read_endio()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 28 May 2026 17:31:37 +0000 (18:31 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 4 Jun 2026 08:28:09 +0000 (10:28 +0200)
All buffer heads submitted by gfs2_submit_bhs() use
end_buffer_read_sync() so we can call it directly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://patch.msgid.link/20260528173150.1093780-25-willy@infradead.org
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: gfs2@lists.linux.dev
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/gfs2/meta_io.c

index d407dd476e72035a5f87bb8529d1ca2bebda86d7..df5f05054f6e86fc38a28d8b8a4bc15c01b1dc5c 100644 (file)
@@ -212,7 +212,7 @@ static void gfs2_meta_read_endio(struct bio *bio)
                do {
                        struct buffer_head *next = bh->b_this_page;
                        len -= bh->b_size;
-                       bh->b_end_io(bh, !bio->bi_status);
+                       end_buffer_read_sync(bh, bio->bi_status == BLK_STS_OK);
                        bh = next;
                } while (bh && len);
        }
@@ -275,7 +275,6 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
                unlock_buffer(bh);
                flags &= ~DIO_WAIT;
        } else {
-               bh->b_end_io = end_buffer_read_sync;
                get_bh(bh);
                bhs[num++] = bh;
        }
@@ -288,7 +287,6 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
                        unlock_buffer(bh);
                        brelse(bh);
                } else {
-                       bh->b_end_io = end_buffer_read_sync;
                        bhs[num++] = bh;
                }
        }