rusticl/memory: use get_mut instead of lock in drop
authorKarol Herbst <kherbst@redhat.com>
Sat, 14 Oct 2023 15:27:30 +0000 (17:27 +0200)
committerMarge Bot <emma+marge@anholt.net>
Sat, 14 Oct 2023 15:32:14 +0000 (15:32 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25727>

src/gallium/frontends/rusticl/core/memory.rs

index 3d3c812..d361111 100644 (file)
@@ -1242,7 +1242,7 @@ impl Drop for Mem {
             .rev()
             .for_each(|cb| cb(cl));
 
-        for (d, tx) in self.maps.lock().unwrap().tx.drain() {
+        for (d, tx) in self.maps.get_mut().unwrap().tx.drain() {
             d.helper_ctx().unmap(tx.tx);
         }
     }