diff options
| author | Jason Gunthorpe <[email protected]> | 2021-10-15 08:40:53 -0300 |
|---|---|---|
| committer | Alex Williamson <[email protected]> | 2021-10-15 13:58:20 -0600 |
| commit | 2b678aa2f0990a25e15cdef66256a131566ecd2e (patch) | |
| tree | 96c10c15697f3d0e3f9db7ed695e12193024fb30 /drivers/platform/surface/aggregator/ssh_parser.c | |
| 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 <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'drivers/platform/surface/aggregator/ssh_parser.c')
0 files changed, 0 insertions, 0 deletions