Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb700d36 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt
Browse files

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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 4286f84e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
}

+0 −2
Original line number Diff line number Diff line
@@ -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);
	}