On Thu, Feb 26, 2026 at 06:49:21AM -0800, Christoph Hellwig wrote:
> Make io_submit_init_bio complete by also initializing the write hint.
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---
> fs/ext4/page-io.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
> index a8c95eee91b7..a3644d6cb65f 100644
> --- a/fs/ext4/page-io.c
> +++ b/fs/ext4/page-io.c
> @@ -416,6 +416,7 @@ void ext4_io_submit_init(struct ext4_io_submit *io,
> }
>
> static void io_submit_init_bio(struct ext4_io_submit *io,
> + struct inode *inode,
> struct buffer_head *bh)
> {
> struct bio *bio;
> @@ -430,6 +431,7 @@ static void io_submit_init_bio(struct ext4_io_submit *io,
> bio->bi_end_io = ext4_end_bio;
> bio->bi_private = ext4_get_io_end(io->io_end);
> io->io_bio = bio;
> + io->io_bio->bi_write_hint = inode->i_write_hint;
> io->io_next_block = bh->b_blocknr;
> wbc_init_bio(io->io_wbc, bio);
> }
Maybe make this consistent with the other initializations by moving it
up a line and doing:
bio->bi_write_hint = inode->i_write_hint;
- Eric