From: Joris Giovannangeli Date: Sat, 22 Feb 2014 00:30:12 +0000 (+0100) Subject: ttm: fix porting typo X-Git-Tag: v3.9.0~495 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/ea6f52c4fb2da1957cbee60ff4daf8be83de1f8e ttm: fix porting typo Bug: 2635 Submitted-by: vadaszi --- diff --git a/sys/dev/drm/ttm/ttm_bo.c b/sys/dev/drm/ttm/ttm_bo.c index 0d38876e4a..7a3c6af300 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. */