]> git.itanic.dy.fi Git - linux-stable/commit
nfsd: Fix error cleanup path in nfsd_rename()
authorJan Kara <jack@suse.cz>
Mon, 18 Mar 2024 16:32:09 +0000 (17:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:37:54 +0000 (16:37 +0200)
commit331e125e02c08ffaecc1074af78a988a278039bd
treecefecfe76cf76aae018dbe8d03c8920425c01c89
parent8948e30de81faee87eeee01ef42a1f6008f5a83a
nfsd: Fix error cleanup path in nfsd_rename()

[ Upstream commit 9fe6e9e7b58944037714442384075c17cfde1c56 ]

Commit a8b0026847b8 ("rename(): avoid a deadlock in the case of parents
having no common ancestor") added an error bail out path. However this
path does not drop the remount protection that has been acquired. Fix
the cleanup path to properly drop the remount protection.

Fixes: a8b0026847b8 ("rename(): avoid a deadlock in the case of parents having no common ancestor")
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/vfs.c