OSDN Git Service

virtio-mem: Drop manual check for already present memory
authorDavid Hildenbrand <david@redhat.com>
Thu, 7 May 2020 14:01:36 +0000 (16:01 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 4 Jun 2020 19:36:52 +0000 (15:36 -0400)
commit3c42e198e668e4040ef5cf3ad60d57765abc08a4
treeb4e6383775ebb0c49309991b4a94191650f4d2bb
parentebf71552bb0e690cad523ad175e8c4c89a33c333
virtio-mem: Drop manual check for already present memory

Registering our parent resource will fail if any memory is still present
(e.g., because somebody unloaded the driver and tries to reload it). No
need for the manual check.

Move our "unplug all" handling to after registering the resource.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20200507140139.17083-13-david@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_mem.c