staging: sync: Use proper barriers when waiting indefinitely

The previous fix only addressed waiting with a timeout.

Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <robclark@gmail.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: dri-devel@lists.freedesktop.org
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Erik Gilling <konkers@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Erik Gilling 2013-02-28 16:43:20 -08:00 committed by Greg Kroah-Hartman
parent eeb2f57163
commit 4b5de08a37

View File

@ -588,7 +588,8 @@ int sync_fence_wait(struct sync_fence *fence, long timeout)
sync_fence_check(fence),
timeout);
} else if (timeout < 0) {
err = wait_event_interruptible(fence->wq, fence->status != 0);
err = wait_event_interruptible(fence->wq,
sync_fence_check(fence));
}
if (err < 0)