Commit fa1af65b authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

btrfs use bio_list_merge_init

Use bio_list_merge_init instead of open coding bio_list_merge and
bio_list_init.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarDavid Sterba <dsterba@suse.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20240328084147.2954434-5-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 50bc2150
...@@ -331,12 +331,11 @@ static void steal_rbio(struct btrfs_raid_bio *src, struct btrfs_raid_bio *dest) ...@@ -331,12 +331,11 @@ static void steal_rbio(struct btrfs_raid_bio *src, struct btrfs_raid_bio *dest)
static void merge_rbio(struct btrfs_raid_bio *dest, static void merge_rbio(struct btrfs_raid_bio *dest,
struct btrfs_raid_bio *victim) struct btrfs_raid_bio *victim)
{ {
bio_list_merge(&dest->bio_list, &victim->bio_list); bio_list_merge_init(&dest->bio_list, &victim->bio_list);
dest->bio_list_bytes += victim->bio_list_bytes; dest->bio_list_bytes += victim->bio_list_bytes;
/* Also inherit the bitmaps from @victim. */ /* Also inherit the bitmaps from @victim. */
bitmap_or(&dest->dbitmap, &victim->dbitmap, &dest->dbitmap, bitmap_or(&dest->dbitmap, &victim->dbitmap, &dest->dbitmap,
dest->stripe_nsectors); dest->stripe_nsectors);
bio_list_init(&victim->bio_list);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment