RE: [PATCH 2/6] vfio: Change struct vfio_group::opened from an atomic to bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Sent: Friday, May 6, 2022 8:25 AM
> 
> This is not a performance path, just use the group_rwsem to protect the
> value.
> 
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>

> +	/*
> +	 * Do we need multiple instances of the group open?  Seems not.
> +	 * Is something still in use from a previous open?
> +	 */
> +	if (group->opened || group->container) {
> +		ret = -EBUSY;
> +		goto err_put;
>  	}

I was about to suggest that probably above two checks can be
split so each has its own comment, but then noted the 2nd one
is soon removed by patch05. So it's just fine. 😊





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux