btrfs: raid56: fold rmw_read_wait_recover into rmw_read_bios
authorChristoph Hellwig <hch@lst.de>
Wed, 11 Jan 2023 06:23:30 +0000 (07:23 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 15 Feb 2023 18:38:54 +0000 (19:38 +0100)
commit02efa3a6baffdd753dc04034c848a5956784422d
treed2def6ab353d7932730b4fb3196f5176663f72bf
parentd838d05ea5091044957d664b9f9c38fefcaf6d97
btrfs: raid56: fold rmw_read_wait_recover into rmw_read_bios

There is very little extra code in rmw_read_bios, and a large part of it
is the superfluous extra cleanup of the bio list.  Merge the two
functions, and only clean up the bio list after it has been added to
but before it has been emptied again by submit_read_wait_bio_list.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c