btrfs: raid56: remove redundant device check in rbio_add_io_page
authorNikolay Borisov <nborisov@suse.com>
Thu, 2 Jul 2020 13:46:42 +0000 (16:46 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:41 +0000 (12:55 +0200)
commitf90ae76a5c2c746c06f11a1709e9149ab2666ea4
treed8be93758117ebf42f1423a3dd9a1cb21304747a
parent608769a4e41cceca6908f1807ebe95e0a07a21d3
btrfs: raid56: remove redundant device check in rbio_add_io_page

The merging logic is always executed if the current stripe's device
is not missing. So there's no point in duplicating the check. Simply
remove it, while at it reduce the scope of the 'last_end' variable.
If the current stripe's device is missing we fail the stripe early on.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c