]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: Fix calling CIFSFindFirst() for root path without msearch
authorPali Rohár <pali@kernel.org>
Mon, 30 Dec 2024 19:54:11 +0000 (20:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:41:21 +0000 (18:41 +0200)
commitf16744e2a8d0e964661a21bb7343fcfd21cec562
treeefac5fa341c18c3836677027532a9496e9e9dd23
parent4a5efa0d1d7661934f35f805b039cdd48d798f02
cifs: Fix calling CIFSFindFirst() for root path without msearch

[ Upstream commit b460249b9a1dab7a9f58483e5349d045ad6d585c ]

To query root path (without msearch wildcard) it is needed to
send pattern '\' instead of '' (empty string).

This allows to use CIFSFindFirst() to query information about root path
which is being used in followup changes.

This change fixes the stat() syscall called on the root path on the mount.
It is because stat() syscall uses the cifs_query_path_info() function and
it can fallback to the CIFSFindFirst() usage with msearch=false.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/cifssmb.c