smb: client: fix file open check in __cifs_unlink()
authorPaulo Alcantara <pc@manguebit.org>
Thu, 18 Sep 2025 15:30:32 +0000 (12:30 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 18 Sep 2025 21:37:59 +0000 (16:37 -0500)
commit251090e2c2c1be60607d1c521af2c993f04d4f61
treec05180d7d0a08a9f52775a5305f5b9c05e652211
parentd9dcbbcf9145b68aa85c40947311a6907277e097
smb: client: fix file open check in __cifs_unlink()

Fix the file open check to decide whether or not silly-rename the file
in SMB2+.

Fixes: c5ea3065586d ("smb: client: fix data loss due to broken rename(2)")
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Cc: Frank Sorenson <sorenson@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/inode.c