[POWERPC] spufs: Free mm if spufs_fill_dir() failed
authorSebastian Siewior <bigeasy@linux.vnet.ibm.com>
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)
In case spufs_fill_dir() fails only put_spu_context()
gets called for cleanup and the acquired mm_struct never gets freed.

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

index fe960ddbde71d09e056b021378fb56dc49d0bc33..08356813977103e173b76bea7213dcf7f9b8bab7 100644 (file)
@@ -274,6 +274,7 @@ spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,
        goto out;
 
 out_free_ctx:
        goto out;
 
 out_free_ctx:
+       spu_forget(ctx);
        put_spu_context(ctx);
 out_iput:
        iput(inode);
        put_spu_context(ctx);
 out_iput:
        iput(inode);