ttm: fix porting typo
authorJoris Giovannangeli <joris@giovannangeli.fr>
Sat, 22 Feb 2014 00:30:12 +0000 (01:30 +0100)
committerJoris Giovannangeli <joris@giovannangeli.fr>
Sat, 22 Feb 2014 00:42:24 +0000 (01:42 +0100)
Bug: 2635
Submitted-by: vadaszi
sys/dev/drm/ttm/ttm_bo.c

index 0d38876..7a3c6af 100644 (file)
@@ -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.
                 */