]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: Change struct vfio_group::container_users to a non-atomic int
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 16 May 2022 23:41:22 +0000 (20:41 -0300)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 17 May 2022 19:07:09 +0000 (13:07 -0600)
commitfa45343cc61c3a6f0586399af3bdeefa30591082
tree3100dc0db4e4f2959d13dcaba51d4a73f12b6b87
parent20b30ce6741978de48a9b4515d0f9035c00797bb
vfio: Change struct vfio_group::container_users to a non-atomic int

Now that everything is fully locked there is no need for container_users
to remain as an atomic, change it to an unsigned int.

Use 'if (group->container)' as the test to determine if the container is
present or not instead of using container_users.

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/6-v2-d035a1842d81+1bf-vfio_group_locking_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c