diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/lguest/lguest.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 4df1804169dc..8ff2d8bc690a 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -923,10 +923,10 @@ static void handle_output(int fd, unsigned long addr) | |||
923 | /* Check each virtqueue. */ | 923 | /* Check each virtqueue. */ |
924 | for (i = devices.dev; i; i = i->next) { | 924 | for (i = devices.dev; i; i = i->next) { |
925 | for (vq = i->vq; vq; vq = vq->next) { | 925 | for (vq = i->vq; vq; vq = vq->next) { |
926 | if (vq->config.pfn == addr/getpagesize() | 926 | if (vq->config.pfn == addr/getpagesize()) { |
927 | && vq->handle_output) { | ||
928 | verbose("Output to %s\n", vq->dev->name); | 927 | verbose("Output to %s\n", vq->dev->name); |
929 | vq->handle_output(fd, vq); | 928 | if (vq->handle_output) |
929 | vq->handle_output(fd, vq); | ||
930 | return; | 930 | return; |
931 | } | 931 | } |
932 | } | 932 | } |
@@ -1068,7 +1068,8 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, | |||
1068 | * virtqueue. */ | 1068 | * virtqueue. */ |
1069 | vq->handle_output = handle_output; | 1069 | vq->handle_output = handle_output; |
1070 | 1070 | ||
1071 | /* Set the "Don't Notify Me" flag if we don't have a handler */ | 1071 | /* As an optimization, set the advisory "Don't Notify Me" flag if we |
1072 | * don't have a handler */ | ||
1072 | if (!handle_output) | 1073 | if (!handle_output) |
1073 | vq->vring.used->flags = VRING_USED_F_NO_NOTIFY; | 1074 | vq->vring.used->flags = VRING_USED_F_NO_NOTIFY; |
1074 | } | 1075 | } |