Commit 6747c2ee authored by Kou Ishizaki's avatar Kou Ishizaki Committed by Jeremy Kerr

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: default avatarKou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
Acked-by: default avatarAndre Detsch <adetsch@br.ibm.com>
parent ba0b996d
...@@ -496,6 +496,8 @@ spufs_create_context(struct inode *inode, struct dentry *dentry, ...@@ -496,6 +496,8 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
ret = spufs_context_open(dget(dentry), mntget(mnt)); ret = spufs_context_open(dget(dentry), mntget(mnt));
if (ret < 0) { if (ret < 0) {
WARN_ON(spufs_rmdir(inode, dentry)); WARN_ON(spufs_rmdir(inode, dentry));
if (affinity)
mutex_unlock(&gang->aff_mutex);
mutex_unlock(&inode->i_mutex); mutex_unlock(&inode->i_mutex);
spu_forget(SPUFS_I(dentry->d_inode)->i_ctx); spu_forget(SPUFS_I(dentry->d_inode)->i_ctx);
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment