Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ext4: initialize the write hint in io_submit_init_bio

Make io_submit_init_bio complete by also initializing the write hint.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20260302141922.370070-2-hch@lst.de
Signed-off-by: Eric Biggers <ebiggers@kernel.org>

authored by

Christoph Hellwig and committed by
Eric Biggers
7737b1b4 1f318b96

+4 -4
+4 -4
fs/ext4/page-io.c
··· 416 416 } 417 417 418 418 static void io_submit_init_bio(struct ext4_io_submit *io, 419 + struct inode *inode, 419 420 struct buffer_head *bh) 420 421 { 421 422 struct bio *bio; ··· 430 429 bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9); 431 430 bio->bi_end_io = ext4_end_bio; 432 431 bio->bi_private = ext4_get_io_end(io->io_end); 432 + bio->bi_write_hint = inode->i_write_hint; 433 433 io->io_bio = bio; 434 434 io->io_next_block = bh->b_blocknr; 435 435 wbc_init_bio(io->io_wbc, bio); ··· 447 445 submit_and_retry: 448 446 ext4_io_submit(io); 449 447 } 450 - if (io->io_bio == NULL) { 451 - io_submit_init_bio(io, bh); 452 - io->io_bio->bi_write_hint = inode->i_write_hint; 453 - } 448 + if (io->io_bio == NULL) 449 + io_submit_init_bio(io, inode, bh); 454 450 if (!bio_add_folio(io->io_bio, io_folio, bh->b_size, bh_offset(bh))) 455 451 goto submit_and_retry; 456 452 wbc_account_cgroup_owner(io->io_wbc, folio, bh->b_size);