mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vhost_user_net: Use Mutex::get_mut() where possible
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -205,7 +205,7 @@ impl VhostUserBackendMut for VhostUserNetBackend {
|
||||
vrings: &[VringRwLock<GuestMemoryAtomic<GuestMemoryMmap>>],
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user