bdev/virtio: fix tailq corruption on failed init

Each device was being removed from the tailq twice.
virtio_scsi_dev_remove does the removal by itself.

Change-Id: I2320fc88ac60ddd5952b07b26c679c8f2e887976
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/405180
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Dariusz Stojaczyk 2018-03-25 14:17:30 +02:00 committed by Jim Harris
parent 6ccc262022
commit 20acc18bf3

View File

@ -1726,7 +1726,6 @@ bdev_virtio_initialize(void)
out:
/* Remove any created devices */
TAILQ_FOREACH_SAFE(svdev, &g_virtio_scsi_devs, tailq, next_svdev) {
TAILQ_REMOVE(&g_virtio_scsi_devs, svdev, tailq);
virtio_scsi_dev_remove(svdev, NULL, NULL);
}