From: Matthew Wilcox (Oracle) Date: Thu, 28 May 2026 17:31:20 +0000 (+0100) Subject: buffer: Convert __sync_dirty_buffer to bh_submit() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac13eb47988fa871abcc3f34df946b5c039b3481;p=thirdparty%2Flinux.git buffer: Convert __sync_dirty_buffer to bh_submit() Avoid an extra indirect function call and changing the buffer refcount by using bh_submit() instead of submit_bh(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://patch.msgid.link/20260528173150.1093780-8-willy@infradead.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner (Amutable) --- diff --git a/fs/buffer.c b/fs/buffer.c index f8428f802b681..deabf74793250 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2857,9 +2857,7 @@ int __sync_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags) return -EIO; } - get_bh(bh); - bh->b_end_io = end_buffer_write_sync; - submit_bh(REQ_OP_WRITE | op_flags, bh); + bh_submit(bh, REQ_OP_WRITE | op_flags, bh_end_write); wait_on_buffer(bh); if (!buffer_uptodate(bh)) return -EIO;