aboutsummaryrefslogtreecommitdiff
path: root/util/event_notifier-posix.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-01-24 19:24:26 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-01-24 19:24:26 +0000
commit834a336eb911db8a8ca00e760ee6a85faca19414 (patch)
tree164006825d183ae89b986b9f3585cc3b404a1ae4 /util/event_notifier-posix.c
parent82de978a8b01c37e57a4782012b88ce89e0fa4f6 (diff)
parente044c0f8dd028ea296396ad8066ba436e9acf350 (diff)
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
virtio: quick fix Fixes a regression in virtio that's causing issues for many people. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Wed 24 Jan 2018 17:20:24 GMT # gpg: using RSA key 0x281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: Revert "qemu: add a cleanup callback function to EventNotifier" Revert "virtio: postpone the execution of event_notifier_cleanup function" Revert "virtio: improve virtio devices initialization time" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util/event_notifier-posix.c')
-rw-r--r--util/event_notifier-posix.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/util/event_notifier-posix.c b/util/event_notifier-posix.c
index 652566634a..73c4046b58 100644
--- a/util/event_notifier-posix.c
+++ b/util/event_notifier-posix.c
@@ -29,7 +29,6 @@ void event_notifier_init_fd(EventNotifier *e, int fd)
{
e->rfd = fd;
e->wfd = fd;
- e->cleanup = NULL;
}
#endif
@@ -66,7 +65,6 @@ int event_notifier_init(EventNotifier *e, int active)
e->rfd = fds[0];
e->wfd = fds[1];
}
- e->cleanup = NULL;
if (active) {
event_notifier_set(e);
}
@@ -82,11 +80,10 @@ void event_notifier_cleanup(EventNotifier *e)
{
if (e->rfd != e->wfd) {
close(e->rfd);
+ e->rfd = -1;
}
close(e->wfd);
- e->rfd = -1;
e->wfd = -1;
- e->cleanup = NULL;
}
int event_notifier_get_fd(const EventNotifier *e)