mirror of https://gitee.com/openkylin/linux.git
drm/ttm: Fix accounting error when fail to get pages for pool
When fail to get needed page for pool, need to put allocated pages into pool. But current code has a miscalculation of allocated pages, correct it. Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
This commit is contained in:
parent
d07f14be4d
commit
9afae27192
|
@ -615,7 +615,7 @@ static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool,
|
||||||
} else {
|
} else {
|
||||||
pr_err("Failed to fill pool (%p)\n", pool);
|
pr_err("Failed to fill pool (%p)\n", pool);
|
||||||
/* If we have any pages left put them to the pool. */
|
/* If we have any pages left put them to the pool. */
|
||||||
list_for_each_entry(p, &pool->list, lru) {
|
list_for_each_entry(p, &new_pages, lru) {
|
||||||
++cpages;
|
++cpages;
|
||||||
}
|
}
|
||||||
list_splice(&new_pages, &pool->list);
|
list_splice(&new_pages, &pool->list);
|
||||||
|
|
Loading…
Reference in New Issue