From patchwork Tue Sep 30 10:09:42 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: powerpc/spufs: add a missing mutex_unlock Date: Tue, 30 Sep 2008 00:09:42 -0000 From: Kou Ishizaki X-Patchwork-Id: 2077 Message-Id: <20080930.190942.-1300537374.kouish@swc.toshiba.co.jp> To: jk@ozlabs.org, arnd@arndb.de Cc: cbe-oss-dev@ozlabs.org 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 Acked-by: Andre Detsch --- arch/powerpc/platforms/cell/spufs/inode.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) goto out; diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 690ca7b..5c73b62 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -496,5 +496,7 @@ 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);