diff --git a/vhost_user_net/src/lib.rs b/vhost_user_net/src/lib.rs index 56b54ad6d..de2a416aa 100644 --- a/vhost_user_net/src/lib.rs +++ b/vhost_user_net/src/lib.rs @@ -205,7 +205,7 @@ impl VhostUserBackendMut for VhostUserNetBackend { vrings: &[VringRwLock>], thread_id: usize, ) -> VhostUserBackendResult<()> { - let mut thread = self.threads[thread_id].lock().unwrap(); + let thread = self.threads[thread_id].get_mut().unwrap(); match device_event { 0 => { if !thread.net.rx_tap_listening {