diff options
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r-- | drivers/vhost/vhost.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index c579dcc9200c..dd3d6f7406f8 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -858,11 +858,12 @@ int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, | |||
858 | if (r < 0) | 858 | if (r < 0) |
859 | return r; | 859 | return r; |
860 | len -= l; | 860 | len -= l; |
861 | if (!len) | 861 | if (!len) { |
862 | if (vq->log_ctx) | ||
863 | eventfd_signal(vq->log_ctx, 1); | ||
862 | return 0; | 864 | return 0; |
865 | } | ||
863 | } | 866 | } |
864 | if (vq->log_ctx) | ||
865 | eventfd_signal(vq->log_ctx, 1); | ||
866 | /* Length written exceeds what we have stored. This is a bug. */ | 867 | /* Length written exceeds what we have stored. This is a bug. */ |
867 | BUG(); | 868 | BUG(); |
868 | return 0; | 869 | return 0; |