mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
vhost: fix log ctx signalling
The log eventfd signalling got put in dead code. We didn't notice because qemu currently does polling instead of eventfd select. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
ee05d6939e
commit
5786aee8bf
@ -858,11 +858,12 @@ int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log,
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
len -= l;
|
len -= l;
|
||||||
if (!len)
|
if (!len) {
|
||||||
|
if (vq->log_ctx)
|
||||||
|
eventfd_signal(vq->log_ctx, 1);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (vq->log_ctx)
|
|
||||||
eventfd_signal(vq->log_ctx, 1);
|
|
||||||
/* Length written exceeds what we have stored. This is a bug. */
|
/* Length written exceeds what we have stored. This is a bug. */
|
||||||
BUG();
|
BUG();
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user