Re: [PATCH 02/14] iommufd: Add iommufd_group

Jason Gunthorpe
2023-03-06T19:16:54Z

On Fri, Mar 03, 2023 at 02:13:30AM +0000, Tian, Kevin wrote:
> > From: Jason Gunthorpe <jgg@nvidia.com>
> > Sent: Thursday, March 2, 2023 8:52 PM
> >
> >
> > > > @@ -98,7 +195,7 @@ struct iommufd_device
> > *iommufd_device_bind(struct
> > > > iommufd_ctx *ictx,
> > > > /* The calling driver is a user until iommufd_device_unbind() */
> > > > refcount_inc(&idev->obj.users);
> > > > /* group refcount moves into iommufd_device */
> > > > - idev->group = group;
> > > > + idev->igroup = igroup;
> > >
> > > the comment about group refcount is stale now.
> >
> > You mean it should say 'igroup refcount' ?
> >
>
> The original comment refers to the refcnt of iommu group.
>
> Now that refcnt is held by iommufd_group and no movement per se.

igroup has a reference as well and it is this reference that is now
being moved

Jason