Commit 66cb4d0
committed
rust: drm/gpuvm: Pass vm_bo explicitly to step_remap()
We cannot drop ARef<GpuVmBo<T>> references within the step_*() calls,
since the destructore takes the object lock but that is already locked
here. Instead of providing a method that the callback can use to obtain
a reference (which, when dropped, would deadlock), grab a reference
ourselves and pass it explicitly into the callback as a &ref. Thus, we
can drop it without locking again.
Signed-off-by: Asahi Lina <lina@asahilina.net>1 parent f2a88f6 commit 66cb4d0
1 file changed
Lines changed: 22 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | 202 | | |
213 | 203 | | |
214 | 204 | | |
| |||
340 | 330 | | |
341 | 331 | | |
342 | 332 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
347 | 354 | | |
348 | 355 | | |
349 | 356 | | |
| |||
0 commit comments