When a signal arrives we should return immediately for
handling it and not try other placements first.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Chunming Zhou <david1.zhou@amd.com>
Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
uint32_t cur_flags = 0;
bool type_found = false;
bool type_ok = false;
- bool has_erestartsys = false;
int i, ret;
ret = reservation_object_reserve_shared(bo->resv, 1);
mem->placement = cur_flags;
return 0;
}
- if (ret == -ERESTARTSYS)
- has_erestartsys = true;
+ if (ret && ret != -EBUSY)
+ return ret;
}
if (!type_found) {
return -EINVAL;
}
- return (has_erestartsys) ? -ERESTARTSYS : -ENOMEM;
+ return -ENOMEM;
}
EXPORT_SYMBOL(ttm_bo_mem_space);