]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vfio/virtio: Use guard() for list_lock where applicable
authorAlex Williamson <alex.williamson@nvidia.com>
Tue, 14 Apr 2026 20:06:20 +0000 (14:06 -0600)
committerAlex Williamson <alex@shazbot.org>
Tue, 21 Apr 2026 18:01:20 +0000 (12:01 -0600)
commit61fcb51fc9d576ec367e8aea9c03dc6a746e395e
tree4dfa70b04509bd378790599c217c439ac0226493
parent903570835f12b7436ca0edb0a9ed351c0349121e
vfio/virtio: Use guard() for list_lock where applicable

Convert list_lock mutex acquisitions to use guard() and scoped_guard()
where the lock scope aligns with the function or block scope.  This
simplifies virtiovf_get_data_buff_from_pos() by replacing goto-based
unwinding with direct returns.

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-3-alex.williamson@nvidia.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
drivers/vfio/pci/virtio/migrate.c