virtio-blk: dataplane cleanup
authorCao jin <caoj.fnst@cn.fujitsu.com>
Mon, 18 Jul 2016 04:05:49 +0000 (12:05 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 18 Jul 2016 14:10:52 +0000 (15:10 +0100)
No need duplicate the judgment, there is one in function entry.

Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1468814749-14510-1-git-send-email-caoj.fnst@cn.fujitsu.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/block/dataplane/virtio-blk.c

index 54b9ac1da6ae90d35792cdaa3a71050a41423b4a..704a763603f6cc99811bdd052a13041d6c9ad1b9 100644 (file)
@@ -112,10 +112,8 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf,
     s->vdev = vdev;
     s->conf = conf;
 
-    if (conf->iothread) {
-        s->iothread = conf->iothread;
-        object_ref(OBJECT(s->iothread));
-    }
+    s->iothread = conf->iothread;
+    object_ref(OBJECT(s->iothread));
     s->ctx = iothread_get_aio_context(s->iothread);
     s->bh = aio_bh_new(s->ctx, notify_guest_bh, s);
     s->batch_notify_vqs = bitmap_new(conf->num_queues);