]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb: client: fix double put of @cfile in smb2_rename_path()
authorPaulo Alcantara <pc@manguebit.com>
Tue, 3 Sep 2024 13:53:23 +0000 (10:53 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2024 09:11:44 +0000 (11:11 +0200)
commitb27ea9c96efd2c252a981fb00d0f001b86c90f3e
treeb18826c08e4dfd57c8cdba4543c11c62cbf1c337
parent52b688c8087b3fb1edd547b18a7cd9c80279212e
smb: client: fix double put of @cfile in smb2_rename_path()

[ Upstream commit 3523a3df03c6f04f7ea9c2e7050102657e331a4f ]

If smb2_set_path_attr() is called with a valid @cfile and returned
-EINVAL, we need to call cifs_get_writable_path() again as the
reference of @cfile was already dropped by previous smb2_compound_op()
call.

Fixes: 71f15c90e785 ("smb: client: retry compound request without reusing lease")
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/smb2inode.c