提交 21818ed0 编写于 作者: Y YueHaibing 提交者: Michael S. Tsirkin

vdpasim: Return status in vdpasim_get_status

vdpasim->status should acquired under spin lock.

Fixes: 870448c31775 ("vdpasim: vDPA device simulator")
Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
Acked-by: NJason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20200402024916.35192-1-yuehaibing@huawei.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 cf29b1ce
......@@ -488,7 +488,7 @@ static u8 vdpasim_get_status(struct vdpa_device *vdpa)
status = vdpasim->status;
spin_unlock(&vdpasim->lock);
return vdpasim->status;
return status;
}
static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册