From: Matthew Wilcox (Oracle) Date: Thu, 28 May 2026 17:31:27 +0000 (+0100) Subject: ext4: Convert write_mmp_block_thawed() to bh_submit() X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=786a9941c727d5cebdc40557bb28117c9d0c21ad;p=thirdparty%2Fkernel%2Flinux.git ext4: Convert write_mmp_block_thawed() 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-15-willy@infradead.org Reviewed-by: Jan Kara Cc: linux-ext4@vger.kernel.org Signed-off-by: Christian Brauner (Amutable) --- diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c index 6f57c181ff77..7ce361484b38 100644 --- a/fs/ext4/mmp.c +++ b/fs/ext4/mmp.c @@ -46,9 +46,8 @@ static int write_mmp_block_thawed(struct super_block *sb, ext4_mmp_csum_set(sb, mmp); lock_buffer(bh); - bh->b_end_io = end_buffer_write_sync; - get_bh(bh); - submit_bh(REQ_OP_WRITE | REQ_SYNC | REQ_META | REQ_PRIO, bh); + bh_submit(bh, REQ_OP_WRITE | REQ_SYNC | REQ_META | REQ_PRIO, + bh_end_write); wait_on_buffer(bh); if (unlikely(!buffer_uptodate(bh))) return -EIO;