From 4be2ca4c10ba388a3798c08d100bf172fe6e4e6d Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 17 Jul 2025 17:06:21 +0000 Subject: [PATCH] vhost_user_net: Use Mutex::get_mut() where possible Signed-off-by: Wei Liu --- vhost_user_net/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {