]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: Don't add swapped BOs to swap-LRU list
authorFelix Kuehling <Felix.Kuehling@amd.com>
Thu, 18 Jan 2018 04:52:03 +0000 (23:52 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Jan 2018 21:14:03 +0000 (16:14 -0500)
commitb52b0de1df80f1b0c37e3f267299d040a03735a3
tree2cbc653a018d601b3dfe33a9d815038f06498c21
parent39aea34196e872183a4ea093d68cd7ff4564b95c
drm/ttm: Don't add swapped BOs to swap-LRU list

A BO that's already swapped would be added back to the swap-LRU list
for example if its validation failed under high memory pressure. This
could later lead to swapping it out again and leaking previous swap
storage.

This commit adds a condition to prevent that from happening.

v2: Check page_flags instead of swap_storage

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>
Cc: stable@vger.kernel.org
drivers/gpu/drm/ttm/ttm_bo.c