From: Kou Ishizaki Date: Wed, 8 Oct 2008 23:45:49 +0000 (+1100) Subject: powerpc/spufs: add a missing mutex_unlock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6747c2ee8abf749e63fee8cd01a9ee293e6a4247;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git powerpc/spufs: add a missing mutex_unlock A mutex_unlock(&gang->aff_mutex) in spufs_create_context() is missing in case spufs_context_open() fails. As a result, spu_create syscall and spu_get_idle() may block. This patch adds the mutex_unlock. Signed-off-by: Kou Ishizaki Signed-off-by: Jeremy Kerr Acked-by: Andre Detsch --- diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index d79ac67c9df1..6b7c7b132454 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -496,6 +496,8 @@ spufs_create_context(struct inode *inode, struct dentry *dentry, ret = spufs_context_open(dget(dentry), mntget(mnt)); if (ret < 0) { WARN_ON(spufs_rmdir(inode, dentry)); + if (affinity) + mutex_unlock(&gang->aff_mutex); mutex_unlock(&inode->i_mutex); spu_forget(SPUFS_I(dentry->d_inode)->i_ctx); goto out;