aio: stop sync_thread earlier

This commit is contained in:
Thomas Schoebel-Theuer 2020-01-22 19:03:58 +01:00 committed by Thomas Schoebel-Theuer
parent 9d0db3beb7
commit b1b812beaa

View File

@ -568,7 +568,8 @@ int aio_sync_thread(void *data)
wait_event_interruptible_timeout(
tinfo->event,
atomic_read(&tinfo->queued_sum) > 0,
atomic_read(&tinfo->queued_sum) > 0 ||
tinfo->should_terminate,
HZ / 4);
mutex_lock(&tinfo->mutex);