diff options
author | Cao jin | 2016-07-18 06:05:49 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2016-07-18 16:10:52 +0200 |
commit | ab3b9c1be8739f109596985588eb061b7f66c1d1 (patch) | |
tree | ee8531a489c7d13ef88f14e8eb805426d28edf74 | |
parent | checkpatch: consider git extended headers valid patches (diff) | |
download | qemu-ab3b9c1be8739f109596985588eb061b7f66c1d1.tar.gz qemu-ab3b9c1be8739f109596985588eb061b7f66c1d1.tar.xz qemu-ab3b9c1be8739f109596985588eb061b7f66c1d1.zip |
virtio-blk: dataplane cleanup
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>
-rw-r--r-- | hw/block/dataplane/virtio-blk.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index 54b9ac1da6..704a763603 100644 --- a/hw/block/dataplane/virtio-blk.c +++ b/hw/block/dataplane/virtio-blk.c @@ -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); |