[PATCH 22/34] gfs2: Convert gfs2_metapath_ra to bh_submit()

"Matthew Wilcox (Oracle)" <[email protected]> Mon, 25 May 2026 18:19:15 +0100
Newsgroups dev.linux.lists.gfs2,org.kernel.vger.linux-fsdevel
Message-ID <[email protected]>
Avoid an extra indirect function call by using bh_submit() instead of
submit_bh().

Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Cc: [email protected]
---
 fs/gfs2/bmap.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index b3d7fcd95f03..9b97b728eb94 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -304,9 +304,10 @@ static void gfs2_metapath_ra(struct gfs2_glock *gl, __be64 *start, __be64 *end)
 		rabh = gfs2_getbuf(gl, be64_to_cpu(*t), CREATE);
 		if (trylock_buffer(rabh)) {
 			if (!buffer_uptodate(rabh)) {
-				rabh->b_end_io = end_buffer_read_sync;
-				submit_bh(REQ_OP_READ | REQ_RAHEAD | REQ_META |
-					  REQ_PRIO, rabh);
+				bh_submit(rabh,
+					REQ_OP_READ | REQ_RAHEAD | REQ_META |
+					REQ_PRIO,
+					bh_end_read);
 				continue;
 			}
 			unlock_buffer(rabh);
-- 
2.47.3