mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
ion: don't call free_buffer_page on failure of ion_hyp_unassign_sg
As we don't know the state of pages after failure from ion_hyp_unassign_sg, don't try to free them to buddy or pool. Change-Id: I54113ef13e25818301bdbe033468070b15cefa55 Signed-off-by: Charan Teja Reddy <charante@codeaurora.org> [isaacm@codeaurora.org: resolved trivial merge conflicts] Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
e666d158eb
commit
c801746d9c
1 changed files with 3 additions and 1 deletions
|
|
@ -390,11 +390,13 @@ err_free_sg2:
|
|||
buffer->private_flags |= ION_PRIV_FLAG_SHRINKER_FREE;
|
||||
|
||||
if (vmid > 0)
|
||||
ion_hyp_unassign_sg(table, &vmid, 1, true);
|
||||
if (ion_hyp_unassign_sg(table, &vmid, 1, true))
|
||||
goto err_free_table_sync;
|
||||
|
||||
for_each_sg(table->sgl, sg, table->nents, i)
|
||||
free_buffer_page(sys_heap, buffer, sg_page(sg),
|
||||
get_order(sg->length));
|
||||
err_free_table_sync:
|
||||
if (nents_sync)
|
||||
sg_free_table(&table_sync);
|
||||
err_free_sg:
|
||||
|
|
|
|||
Loading…
Reference in a new issue