[Cbe-oss-dev] [PATCH 1/2] spufs: Fix gang destroy leaks.

Christoph Hellwig hch at lst.de
Mon May 14 07:48:48 EST 2007


On Thu, May 10, 2007 at 07:16:28PM +1000, Jeremy Kerr wrote:
> 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.

Looks good.

> -		WARN_ON(spufs_rmgang(inode, dentry));
> +		WARN_ON(simple_rmdir(inode, dentry));

But please get rid of this.  BUG_ON/WARN_ON statements should never
have any side effects.




More information about the cbe-oss-dev mailing list