hostmem: no need to check for host_memory_backend_mr_inited() in alloc()
commit86100290cb6600b3d65e0794b45c1b82ead99411
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 10 Sep 2018 13:49:46 +0000 (10 17:49 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 28 Nov 2018 10:51:24 +0000 (28 11:51 +0100)
treef8038870c6549b912e128976401c5f6521e98ee4
parent36ea397956c169aa79db9487de2ea65a938a13e9
hostmem: no need to check for host_memory_backend_mr_inited() in alloc()

memfd_backend_memory_alloc/file_backend_memory_alloc both needlessly
are are calling host_memory_backend_mr_inited() which creates an
illusion that alloc could be called multiple times but it isn't, it's
called once from UserCreatable complete().

Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
backends/hostmem-file.c
backends/hostmem-memfd.c