On 2022/3/22 23:55, Christoph Hellwig wrote:
submit_bio_hooks is always set to btrfs_submit_data_bio, so just remove it.
The same as my recent cleanup for it. https://lore.kernel.org/linux-btrfs/9e29ec4e546249018679224518a465d0240912b0.1647841657.git.wqu@xxxxxxxx/T/#u Although I did extra renaming as submit_read_repair() only works for data read. Reviewed-by: Qu Wenruo <wqu@xxxxxxxx> Thanks, Qu
Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- fs/btrfs/extent_io.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 88d3a46e89a51..238252f86d5ad 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2721,8 +2721,7 @@ static blk_status_t submit_read_repair(struct inode *inode, struct bio *failed_bio, u32 bio_offset, struct page *page, unsigned int pgoff, u64 start, u64 end, int failed_mirror, - unsigned int error_bitmap, - submit_bio_hook_t *submit_bio_hook) + unsigned int error_bitmap) { struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); const u32 sectorsize = fs_info->sectorsize; @@ -2760,7 +2759,7 @@ static blk_status_t submit_read_repair(struct inode *inode, ret = btrfs_repair_one_sector(inode, failed_bio, bio_offset + offset, page, pgoff + offset, start + offset, - failed_mirror, submit_bio_hook); + failed_mirror, btrfs_submit_data_bio); if (!ret) { /* * We have submitted the read repair, the page release @@ -3075,8 +3074,7 @@ static void end_bio_extent_readpage(struct bio *bio) */ submit_read_repair(inode, bio, bio_offset, page, start - page_offset(page), start, - end, mirror, error_bitmap, - btrfs_submit_data_bio); + end, mirror, error_bitmap); ASSERT(bio_offset + len > bio_offset); bio_offset += len;