Skip to content

Commit

Permalink
powerpc/spufs: Fix double unlocks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benjamin Herrenschmidt committed Mar 21, 2012
1 parent 4286f84 commit fb700d3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/platforms/cell/spufs/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit fb700d3

Please sign in to comment.