gpu: ion: Loop on the handle count when destroying
authorLaura Abbott <lauraa@codeaurora.org>
Fri, 13 Dec 2013 22:23:48 +0000 (14:23 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2013 16:55:37 +0000 (08:55 -0800)
commit2900cd767180e9674947101fea96e318dc9b23eb
tree8b740cf8e8de5a39afeee7cbe0f8cb36a52b75dc
parent0de9577b5e708b903a58a9d5e91d6474daa29c2d
gpu: ion: Loop on the handle count when destroying

When destroying a handle, all kernel mappings to that handle
should be destroyed. Other handles may still have references
and valid mappings to the buffer underneath which should not
be destroyed. Loop on the handle reference count, not the buffer
reference count to get rid of all kernel mappings for the handle.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c