projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
dma-buf/fence: don't wait when specified timeout is zero
[linux-block.git]
/
drivers
/
dma-buf
/
fence.c
diff --git
a/drivers/dma-buf/fence.c
b/drivers/dma-buf/fence.c
index e5541117b3e915de7f08ecc38a58ec9f72bf2c12..50ef8bd8708ba69d93808510c9a8be473d377d7c 100644
(file)
--- a/
drivers/dma-buf/fence.c
+++ b/
drivers/dma-buf/fence.c
@@
-159,6
+159,9
@@
fence_wait_timeout(struct fence *fence, bool intr, signed long timeout)
if (WARN_ON(timeout < 0))
return -EINVAL;
+ if (timeout == 0)
+ return fence_is_signaled(fence);
+
trace_fence_wait_start(fence);
ret = fence->ops->wait(fence, intr, timeout);
trace_fence_wait_end(fence);