]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: retry iterate_dir in smb2_query_dir
authorHobin Woo <hobin.woo@samsung.com>
Thu, 5 Dec 2024 02:31:19 +0000 (11:31 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 12:30:04 +0000 (13:30 +0100)
commitca2c565a7c06bead6a61819d8d23a12cf59ef2d6
tree5bb402bf3f5a1d11d738859f82224d1fca2ac3f3
parent42de6037837b924022899fcd6b05270378ee611a
ksmbd: retry iterate_dir in smb2_query_dir

[ Upstream commit 2b904d61a97e8ba79e3bc216ba290fd7e1d85028 ]

Some file systems do not ensure that the single call of iterate_dir
reaches the end of the directory. For example, FUSE fetches entries from
a daemon using 4KB buffer and stops fetching if entries exceed the
buffer. And then an actor of caller, KSMBD, is used to fill the entries
from the buffer.
Thus, pattern searching on FUSE, files located after the 4KB could not
be found and STATUS_NO_SUCH_FILE was returned.

Signed-off-by: Hobin Woo <hobin.woo@samsung.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Tested-by: Yoonho Shin <yoonho.shin@samsung.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/server/smb2pdu.c
fs/smb/server/vfs.h