revert "sync_file: Return consistent status in SYNC_IOC_FILE_INFO [2/3]"
authorbinqi.zhang <binqi.zhang@amlogic.com>
Fri, 8 Dec 2017 12:04:25 +0000 (20:04 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 12 Dec 2017 10:10:54 +0000 (03:10 -0700)
This reverts commit fe912ab314899e3add2993c630c15d28638a3348.

This reverts part commit of ARM and reserved original commit in upstread.

Change-Id: I4e0f39bee86342cd89aa2fb8f10c81f92e4b1985
Signed-off-by: binqi.zhang <binqi.zhang@amlogic.com>
drivers/dma-buf/sync_file.c

index 2ca92a9..d0f5e08 100644 (file)
@@ -173,9 +173,10 @@ static struct fence **get_fences(struct sync_file *sync_file, int *num_fences)
 static void add_fence(struct fence **fences, int *i, struct fence *fence)
 {
        fences[*i] = fence;
-
+       if (!fence_is_signaled(fence)) {
                fence_get(fence);
                (*i)++;
+       }
 }
 
 /**