diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-03-07 06:01:35 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-03-20 20:16:10 -0400 |
commit | fb700d3653acbec8fd1f81496ce4da029e12d557 (patch) | |
tree | a1faed46815de2f139c166293db61fd495e34dd4 /arch/powerpc | |
parent | 4286f84ef6d7f44de1e70b904706bdc3e1f7af01 (diff) |
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/syscalls.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index d4a094ca96f3..114ab14cb7d8 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -646,6 +646,7 @@ long spufs_create(struct path *path, struct dentry *dentry, | |||
646 | 646 | ||
647 | out: | 647 | out: |
648 | mutex_unlock(&path->dentry->d_inode->i_mutex); | 648 | mutex_unlock(&path->dentry->d_inode->i_mutex); |
649 | dput(dentry); | ||
649 | return ret; | 650 | return ret; |
650 | } | 651 | } |
651 | 652 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index 8591bb62d7fc..5665dcc382c7 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c | |||
@@ -70,8 +70,6 @@ static long do_spu_create(const char __user *pathname, unsigned int flags, | |||
70 | ret = PTR_ERR(dentry); | 70 | ret = PTR_ERR(dentry); |
71 | if (!IS_ERR(dentry)) { | 71 | if (!IS_ERR(dentry)) { |
72 | ret = spufs_create(&path, dentry, flags, mode, neighbor); | 72 | ret = spufs_create(&path, dentry, flags, mode, neighbor); |
73 | mutex_unlock(&path.dentry->d_inode->i_mutex); | ||
74 | dput(dentry); | ||
75 | path_put(&path); | 73 | path_put(&path); |
76 | } | 74 | } |
77 | 75 | ||