From 31d771287818bc1d3a748b3db9c33f0a7c6801d3 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 3 Sep 2020 16:38:31 +0100 Subject: [PATCH] virtio-devices: block: Remove duplicated block The same block of code seems to copied twice into the block activation function. Signed-off-by: Rob Bradford --- virtio-devices/src/block.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/virtio-devices/src/block.rs b/virtio-devices/src/block.rs index 31345cb4c..037293948 100644 --- a/virtio-devices/src/block.rs +++ b/virtio-devices/src/block.rs @@ -495,17 +495,6 @@ impl VirtioDevice for Block { } self.queue_evts = Some(tmp_queue_evts); - let mut tmp_queue_evts: Vec = Vec::new(); - for queue_evt in queue_evts.iter() { - // Save the queue EventFD as we need to return it on reset - // but clone it to pass into the thread. - tmp_queue_evts.push(queue_evt.try_clone().map_err(|e| { - error!("failed to clone queue EventFd: {}", e); - ActivateError::BadActivate - })?); - } - self.queue_evts = Some(tmp_queue_evts); - let event_idx = self.common.feature_acked(VIRTIO_RING_F_EVENT_IDX.into()); self.update_writeback();