Commit 5048efee authored by Henrique Carvalho's avatar Henrique Carvalho Committed by Greg Kroah-Hartman
Browse files

smb: client: disable directory caching when dir_cache_timeout is zero



[ Upstream commit ceaf1451 ]

Setting dir_cache_timeout to zero should disable the caching of
directory contents. Currently, even when dir_cache_timeout is zero,
some caching related functions are still invoked, which is unintended
behavior.

Fix the issue by setting tcon->nohandlecache to true when
dir_cache_timeout is zero, ensuring that directory handle caching
is properly disabled.

Fixes: 238b351d ("smb3: allow controlling length of time directory entries are cached with dir leases")
Reviewed-by: default avatarPaulo Alcantara (Red Hat) <pc@manguebit.com>
Reviewed-by: default avatarEnzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: default avatarHenrique Carvalho <henrique.carvalho@suse.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b7ed8eba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment