Commit b5b268c
vfio/virtio: Use guard() for migf->lock where applicable
Convert migf->lock acquisitions in virtiovf_disable_fd() and
virtiovf_save_read() to use guard(). In virtiovf_save_read() this
eliminates the out_unlock label and multiple goto paths by allowing
direct returns, and removes the need for the done variable to double
as an error carrier.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Alex Williamson <alex.williamson@nvidia.com>
Reviewed-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20260414200625.3601509-4-alex.williamson@nvidia.com
Signed-off-by: Alex Williamson <alex@shazbot.org>1 parent 61fcb51 commit b5b268c
1 file changed
Lines changed: 14 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | 230 | | |
232 | 231 | | |
233 | 232 | | |
| |||
385 | 384 | | |
386 | 385 | | |
387 | 386 | | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
393 | 391 | | |
394 | 392 | | |
395 | 393 | | |
| |||
398 | 396 | | |
399 | 397 | | |
400 | 398 | | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
409 | 403 | | |
410 | 404 | | |
411 | 405 | | |
412 | | - | |
| 406 | + | |
413 | 407 | | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
| 408 | + | |
| 409 | + | |
418 | 410 | | |
419 | 411 | | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
| 412 | + | |
| 413 | + | |
424 | 414 | | |
425 | 415 | | |
426 | 416 | | |
427 | | - | |
428 | | - | |
429 | 417 | | |
430 | 418 | | |
431 | 419 | | |
| |||
0 commit comments