vhost_user_net: Use Mutex::get_mut() where possible
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
5716af09a5
commit
4be2ca4c10
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue