> From: Liu, Yi L <yi.l.liu@xxxxxxxxx> > Sent: Thursday, November 24, 2022 8:27 PM > > From: Jason Gunthorpe <jgg@xxxxxxxxxx> > > The vfio.group_lock is now only used to serialize vfio_group creation > and destruction, we don't need a micro-optimization of searching, > unlocking, then allocating and searching again. Just hold the lock > the whole time. > > Grabbed from: > https://lore.kernel.org/kvm/20220922152338.2a2238fe.alex.williamson@red > hat.com/ > > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > Signed-off-by: Alex Williamson <alex.williamson@xxxxxxxxxx> > Signed-off-by: Yi Liu <yi.l.liu@xxxxxxxxx> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>