]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: Change vfio_group->group_rwsem to a mutex
authorJason Gunthorpe <jgg@nvidia.com>
Thu, 29 Sep 2022 14:59:25 +0000 (11:59 -0300)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 4 Oct 2022 18:06:58 +0000 (12:06 -0600)
commitf4d76f5945f511ec348685fbffa8d1d60f391d5f
tree3cdb8747c5bbe641a1f0811aaa403dbc7364ff28
parentc7b7dadd3013e2fbebf2bb2840a59736dc859239
vfio: Change vfio_group->group_rwsem to a mutex

These days not much is using the read side:
 - device first open
 - ioctl_get_status
 - device FD release
 - check enforced_coherent

None of this is performance, so just make it into a normal mutex.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/2-v1-917e3647f123+b1a-vfio_group_users_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/container.c
drivers/vfio/vfio.h
drivers/vfio/vfio_main.c