Skip to content

Commit

Permalink
vhost: fix log ctx signalling
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mstsirkin committed Sep 22, 2010
1 parent ee05d69 commit 5786aee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/vhost/vhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,11 +858,12 @@ int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log,
if (r < 0)
return r;
len -= l;
if (!len)
if (!len) {
if (vq->log_ctx)
eventfd_signal(vq->log_ctx, 1);
return 0;
}
}
if (vq->log_ctx)
eventfd_signal(vq->log_ctx, 1);
/* Length written exceeds what we have stored. This is a bug. */
BUG();
return 0;
Expand Down

0 comments on commit 5786aee

Please sign in to comment.