mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-10-03 01:34:41 +00:00
backends/iommufd: Remove check on number of backend users
QOM already has a ref count on objects and it will assert much earlier, when INT_MAX is reached. Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
c817e5a377
commit
c2ab3a6f74
|
@ -80,11 +80,6 @@ int iommufd_backend_connect(IOMMUFDBackend *be, Error **errp)
|
||||||
int fd, ret = 0;
|
int fd, ret = 0;
|
||||||
|
|
||||||
qemu_mutex_lock(&be->lock);
|
qemu_mutex_lock(&be->lock);
|
||||||
if (be->users == UINT32_MAX) {
|
|
||||||
error_setg(errp, "too many connections");
|
|
||||||
ret = -E2BIG;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
if (be->owned && !be->users) {
|
if (be->owned && !be->users) {
|
||||||
fd = qemu_open_old("/dev/iommu", O_RDWR);
|
fd = qemu_open_old("/dev/iommu", O_RDWR);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
|
Loading…
Reference in a new issue