staging: ion: debugfs to shrink pool

This patch enables debugfs file /sys/kernel/debug/ion/heaps/system_shrink
to shrink pool and get pool size. This technically enables debugfs
shrinking for all heaps, not just the system heap although the system heap
is the only one with a shrinker right now. It is already implemented
but not complete. This patch completes and enables it.

Reading the file returns pool size
in page unit and writing the number of pages shrinks pool.
It flushes all pages to write zero at the file.

Signed-off-by: Gioh Kim <>
Reviewed-by: Laura Abbott <>
Signed-off-by: Greg Kroah-Hartman <>
(cherry picked from commit aeb7fa7b4f29ce4d7d16c4c3565c4714f2f62b82)
1 file changed