sync: use proper barriers when waiting indefinitely
authorErik Gilling <konkers@android.com>
Tue, 16 Oct 2012 00:58:46 +0000 (17:58 -0700)
committer黄涛 <huangtao@rock-chips.com>
Fri, 22 Feb 2013 09:47:15 +0000 (17:47 +0800)
The previous fix only addressed waiting with a timeout.

Change-Id: I8ad735d2d0dfdd53592904e8a54f5689cb5eaa5e
Signed-off-by: Erik Gilling <konkers@android.com>
drivers/base/sync.c

index b35344da4529eaea9ea5222724e5ce32fd9f0955..811365789d5b186384ba908183e777e1762e298f 100644 (file)
@@ -587,7 +587,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)