Project

General

Profile

Bug #2635 » patch-ttm_bo.c

vadaszi, 02/21/2014 03:59 PM

 
diff --git a/sys/dev/drm/ttm/ttm_bo.c b/sys/dev/drm/ttm/ttm_bo.c
index 0d38876..7a3c6af 100644
--- a/sys/dev/drm/ttm/ttm_bo.c
+++ b/sys/dev/drm/ttm/ttm_bo.c
@@ -203,7 +203,7 @@ int ttm_bo_reserve_nolru(struct ttm_buffer_object *bo,
{
int ret;
- while (unlikely(atomic_read(&bo->reserved) != 0)) {
+ while (unlikely(atomic_xchg(&bo->reserved, 1) != 0)) {
/**
* Deadlock avoidance for multi-bo reserving.
*/
(1-1/4)