aio / timers: Consistent treatment of disabled clocks for deadlines

Make treatment of disabled clocks consistent in deadline calculation

Signed-off-by: Alex Bligh <alex@alex.org.uk>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Alex Bligh 2013-08-21 16:02:42 +01:00 committed by Stefan Hajnoczi
parent 02a03a9f12
commit 043a7e1f8f
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ int64_t qemu_clock_deadline(QEMUClock *clock)
/* To avoid problems with overflow limit this to 2^32. */
int64_t delta = INT32_MAX;
if (clock->active_timers) {
if (clock->enabled && clock->active_timers) {
delta = clock->active_timers->expire_time - qemu_get_clock_ns(clock);
}
if (delta < 0) {