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)
commit3ca5470878ebe9e31d3292391ae5fd63ab625a0b
tree3100dc0db4e4f2959d13dcaba51d4a73f12b6b87
parentb76c0eed748605afe8cddcc45c574f7f8536551a
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