vfio: Remove the vfio_group->users and users_comp
authorJason Gunthorpe <jgg@nvidia.com>
Thu, 29 Sep 2022 14:59:24 +0000 (11:59 -0300)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 4 Oct 2022 18:06:58 +0000 (12:06 -0600)
commit912b74d26c7df2da1e261f3dac8942c8cbb76a49
treedc28df6504b695955339e6ab871c79ffea8e4ca1
parent9c799c224d6ebc5be51065bd3217a2d7eea23b8f
vfio: Remove the vfio_group->users and users_comp

Kevin points out that the users is really just tracking if
group->opened_file is set, so we can simplify this code to a wait_queue
that looks for !opened_file under the group_rwsem.

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