On Tue, 23 Mar 2021 14:55:27 -0300 Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > mdev_device->type->parent is the same thing. > > The struct mdev_device was relying on the kref on the mdev_parent to also > indirectly hold a kref on the mdev_type pointer. Now that the type holds a > kref on the parent we can directly kref the mdev_type and remove this > implicit relationship. > > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > --- > drivers/vfio/mdev/mdev_core.c | 13 +++++-------- > drivers/vfio/mdev/vfio_mdev.c | 14 +++++++------- > include/linux/mdev.h | 1 - > 3 files changed, 12 insertions(+), 16 deletions(-) With or without an additional wrapper: Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>