aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKou Ishizaki <kou.ishizaki@toshiba.co.jp>2008-10-08 19:45:49 -0400
committerJeremy Kerr <jk@ozlabs.org>2008-10-09 20:06:17 -0400
commit6747c2ee8abf749e63fee8cd01a9ee293e6a4247 (patch)
treec1cb647d2169d0d12eab81e65b7f90d68a89f244
parentba0b996d01eaca4f3cc1f07dcc238fcad7e0d427 (diff)
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 <kou.ishizaki@toshiba.co.jp> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Acked-by: Andre Detsch <adetsch@br.ibm.com>
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index d79ac67c9df..6b7c7b13245 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,
496 ret = spufs_context_open(dget(dentry), mntget(mnt)); 496 ret = spufs_context_open(dget(dentry), mntget(mnt));
497 if (ret < 0) { 497 if (ret < 0) {
498 WARN_ON(spufs_rmdir(inode, dentry)); 498 WARN_ON(spufs_rmdir(inode, dentry));
499 if (affinity)
500 mutex_unlock(&gang->aff_mutex);
499 mutex_unlock(&inode->i_mutex); 501 mutex_unlock(&inode->i_mutex);
500 spu_forget(SPUFS_I(dentry->d_inode)->i_ctx); 502 spu_forget(SPUFS_I(dentry->d_inode)->i_ctx);
501 goto out; 503 goto out;