[PATCH 23/34] gfs2: Convert gfs2_dir_readahead to bh_submit()

"Matthew Wilcox (Oracle)" <[email protected]> Mon, 25 May 2026 18:19:16 +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/dir.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 022dbb31e0d9..f5972160906e 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -1508,9 +1508,9 @@ static void gfs2_dir_readahead(struct inode *inode, unsigned hsize, u32 index,
 				brelse(bh);
 				continue;
 			}
-			bh->b_end_io = end_buffer_read_sync;
-			submit_bh(REQ_OP_READ | REQ_RAHEAD | REQ_META |
-				  REQ_PRIO, bh);
+			bh_submit(bh,
+				REQ_OP_READ | REQ_RAHEAD | REQ_META | REQ_PRIO,
+				bh_end_read);
 			continue;
 		}
 		brelse(bh);
-- 
2.47.3