diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2026-05-28 20:31:28 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-06-04 11:28:08 +0300 |
| commit | aa17449d60c7f088d4ffb77044d88c4692fc76bb (patch) | |
| tree | 009f1b0c7a7707204bcdf3a66d7685bc57b75dc0 | |
| parent | 786a9941c727d5cebdc40557bb28117c9d0c21ad (diff) | |
| download | linux-aa17449d60c7f088d4ffb77044d88c4692fc76bb.tar.xz | |
ext4: Convert ext4_commit_super() 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) <willy@infradead.org>
Link: https://patch.msgid.link/20260528173150.1093780-16-willy@infradead.org
Acked-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
| -rw-r--r-- | fs/ext4/super.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index bc7faedcb8e4..7283108d7609 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -6316,12 +6316,10 @@ static int ext4_commit_super(struct super_block *sb) clear_buffer_write_io_error(sbh); set_buffer_uptodate(sbh); } - get_bh(sbh); /* Clear potential dirty bit if it was journalled update */ clear_buffer_dirty(sbh); - sbh->b_end_io = end_buffer_write_sync; - submit_bh(REQ_OP_WRITE | REQ_SYNC | - (test_opt(sb, BARRIER) ? REQ_FUA : 0), sbh); + bh_submit(sbh, REQ_OP_WRITE | REQ_SYNC | + (test_opt(sb, BARRIER) ? REQ_FUA : 0), bh_end_write); wait_on_buffer(sbh); if (buffer_write_io_error(sbh)) { ext4_msg(sb, KERN_ERR, "I/O error while writing " |
