Browse Source

Fix warning

(write invalidation are FETCHs anyway, but better be safe)
Samuel Thibault 4 years ago
parent
commit
905a42d2a7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/datawizard/data_request.c

+ 1 - 1
src/datawizard/data_request.c

@@ -602,7 +602,7 @@ static int starpu_handle_data_request(struct _starpu_data_request *r, unsigned m
 	/* For prefetches, we take a reference on the destination only now that
 	 * we will really try to fetch the data (instead of in
 	 * _starpu_create_data_request) */
-	if (r->prefetch > STARPU_FETCH)
+	if (dst_replicate && r->prefetch > STARPU_FETCH)
 	{
 		r->added_ref = 1;	/* Note: we might get upgraded while trying to allocate */
 		dst_replicate->refcnt++;