bdev/raid: Remove unnecessary check in raid_bdev_remove_base_bdev
The condition that both raid_bdev and raid_bdev->base_bdev_info[i].bdev are not NULL is already verified by matching it with base_bdev. This is a preparation to the further refactoring in the next patch. Change-Id: I273a31c2ff2f79caf52b59938eee547129768abe Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/430511 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
This commit is contained in:
parent
e9344656a0
commit
935c0b4745
@ -1481,14 +1481,11 @@ raid_bdev_remove_base_bdev(void *ctx)
|
||||
return;
|
||||
}
|
||||
|
||||
assert(raid_bdev != NULL);
|
||||
assert(raid_bdev->base_bdev_info[i].bdev);
|
||||
assert(raid_bdev->base_bdev_info[i].desc);
|
||||
raid_bdev->base_bdev_info[i].remove_scheduled = true;
|
||||
|
||||
if ((raid_bdev->destruct_called == true ||
|
||||
raid_bdev->state == RAID_BDEV_STATE_CONFIGURING) &&
|
||||
raid_bdev->base_bdev_info[i].bdev != NULL) {
|
||||
if (raid_bdev->destruct_called == true ||
|
||||
raid_bdev->state == RAID_BDEV_STATE_CONFIGURING) {
|
||||
/*
|
||||
* As raid bdev is not registered yet or already unregistered, so cleanup
|
||||
* should be done here itself
|
||||
|
Loading…
Reference in New Issue
Block a user