mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
drm/ttm: Don't unreserve swapped BOs that were previously reserved
If ttm_bo_swapout doesn't own the lock, don't release it. Someone else probably depends on it still being locked. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
fd5002d6a3
commit
ad76c65ec3
1 changed files with 2 additions and 2 deletions
|
@ -1780,8 +1780,8 @@ int ttm_bo_swapout(struct ttm_bo_global *glob, struct ttm_operation_ctx *ctx)
|
|||
* Unreserve without putting on LRU to avoid swapping out an
|
||||
* already swapped buffer.
|
||||
*/
|
||||
|
||||
reservation_object_unlock(bo->resv);
|
||||
if (locked)
|
||||
reservation_object_unlock(bo->resv);
|
||||
kref_put(&bo->list_kref, ttm_bo_release_list);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue