Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6587457b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull dma-buf fixes from Sumit Semwal:
 "Minor timeout & other fixes on reservation/fence"

* tag 'dma-buf-for-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf:
  reservation: Remove shadowing local variable 'ret'
  dma-buf/fence: don't wait when specified timeout is zero
  reservation: wait only with non-zero timeout specified (v3)
parents b8e81a3b 4eb2440e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
+3 −2
Original line number Diff line number Diff line
@@ -327,6 +327,9 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj,
	unsigned seq, shared_count, i = 0;
	long ret = timeout;

	if (!timeout)
		return reservation_object_test_signaled_rcu(obj, wait_all);

retry:
	fence = NULL;
	shared_count = 0;
@@ -402,8 +405,6 @@ reservation_object_test_signaled_single(struct fence *passed_fence)
	int ret = 1;

	if (!test_bit(FENCE_FLAG_SIGNALED_BIT, &lfence->flags)) {
		int ret;

		fence = fence_get_rcu(lfence);
		if (!fence)
			return -1;