mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-18 10:35:23 +00:00
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 <robert.bradford@intel.com>
This commit is contained in:
parent
e5ce6dc43c
commit
31d7712878
@ -495,17 +495,6 @@ impl<T: 'static + DiskFile + Send> VirtioDevice for Block<T> {
|
|||||||
}
|
}
|
||||||
self.queue_evts = Some(tmp_queue_evts);
|
self.queue_evts = Some(tmp_queue_evts);
|
||||||
|
|
||||||
let mut tmp_queue_evts: Vec<EventFd> = 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());
|
let event_idx = self.common.feature_acked(VIRTIO_RING_F_EVENT_IDX.into());
|
||||||
self.update_writeback();
|
self.update_writeback();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user