]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spufs: fix a leak on spufs_new_file() failure
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 9 Mar 2025 00:26:31 +0000 (19:26 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:33:40 +0000 (14:33 +0200)
commit96de7fbdc2dcadeebc17c3cb89e7cdab487bfce0
tree3dd67049574f2e98e5670127f1fe44be2467e784
parentad387704e98cae1ab0f657a35340c03a836c59ae
spufs: fix a leak on spufs_new_file() failure

[ Upstream commit d1ca8698ca1332625d83ea0d753747be66f9906d ]

It's called from spufs_fill_dir(), and caller of that will do
spufs_rmdir() in case of failure.  That does remove everything
we'd managed to create, but... the problem dentry is still
negative.  IOW, it needs to be explicitly dropped.

Fixes: 3f51dd91c807 "[PATCH] spufs: fix spufs_fill_dir error path"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/cell/spufs/inode.c