powerpc/spufs: Fix double unlocks

spufs return path has a bug where it could end up trying to
unlock an inode mutex twice. Fix it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Benjamin Herrenschmidt 2012-03-07 11:01:35 +00:00
parent 4286f84ef6
commit fb700d3653
2 changed files with 1 additions and 2 deletions

View file

@ -646,6 +646,7 @@ long spufs_create(struct path *path, struct dentry *dentry,
out:
mutex_unlock(&path->dentry->d_inode->i_mutex);
dput(dentry);
return ret;
}

View file

@ -70,8 +70,6 @@ static long do_spu_create(const char __user *pathname, unsigned int flags,
ret = PTR_ERR(dentry);
if (!IS_ERR(dentry)) {
ret = spufs_create(&path, dentry, flags, mode, neighbor);
mutex_unlock(&path.dentry->d_inode->i_mutex);
dput(dentry);
path_put(&path);
}