From: Jeremy Kerr Date: Mon, 4 Jun 2007 13:26:51 +0000 (+1000) Subject: [POWERPC] spufs: Fix gang destroy leaks X-Git-Tag: v2.6.22-rc5~102^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=877907d37da9694a34adc9dc3e2ce09400148cb5;p=pandora-kernel.git [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 Signed-off-by: Arnd Bergmann Signed-off-by: Paul Mackerras --- Reading git-diff-tree failed