]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[POWERPC] spufs: Fix gang destroy leaks
authorJeremy Kerr <jk@ozlabs.org>
Mon, 4 Jun 2007 13:26:51 +0000 (23:26 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 7 Jun 2007 01:44:39 +0000 (11:44 +1000)
commit877907d37da9694a34adc9dc3e2ce09400148cb5
tree4cb8ffe949e3beeb3ccc0d58824a215e83e6f63c
parentce92987baba60bc082b9eedddfaf4ae3f8435dac
[POWERPC] spufs: Fix gang destroy leaks

Previously, closing a SPE gang that still has contexts would trigger
a WARN_ON, and leak the allocated gang.

This change fixes the problem by using the gang's reference counts to
destroy the gang instead. The gangs will persist until their last
reference (be it context or open file handle) is gone.

Also, avoid using statements with side-effects in a WARN_ON().

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/cell/spufs/inode.c