diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2021-10-15 08:40:53 -0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2021-10-15 13:58:20 -0600 |
commit | 2b678aa2f0990a25e15cdef66256a131566ecd2e (patch) | |
tree | 96c10c15697f3d0e3f9db7ed695e12193024fb30 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 325a31c920309d2225311573a05c2f4dd402b2ed (diff) |
vfio: Use a refcount_t instead of a kref in the vfio_group
The next patch adds a struct device to the struct vfio_group, and it is
confusing/bad practice to have two krefs in the same struct. This kref is
controlling the period when the vfio_group is registered in sysfs, and
visible in the internal lookup. Switch it to a refcount_t instead.
The refcount_dec_and_mutex_lock() is still required because we need
atomicity of the list searches and sysfs presence.
Reviewed-by: Liu Yi L <yi.l.liu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/4-v3-2fdfe4ca2cc6+18c-vfio_group_cdev_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions